Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / components / content_settings / core / browser / BUILD.gn
blob852f2c003e6be21343fb58e487686c29c691d2ee
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/features.gni")
7 static_library("browser") {
8   sources = [
9     "content_settings_binary_value_map.cc",
10     "content_settings_binary_value_map.h",
11     "content_settings_client.h",
12     "content_settings_default_provider.cc",
13     "content_settings_default_provider.h",
14     "content_settings_details.cc",
15     "content_settings_details.h",
16     "content_settings_info.cc",
17     "content_settings_info.h",
18     "content_settings_observable_provider.cc",
19     "content_settings_observable_provider.h",
20     "content_settings_observer.h",
21     "content_settings_origin_identifier_value_map.cc",
22     "content_settings_origin_identifier_value_map.h",
23     "content_settings_policy_provider.cc",
24     "content_settings_policy_provider.h",
25     "content_settings_pref.cc",
26     "content_settings_pref.h",
27     "content_settings_pref_provider.cc",
28     "content_settings_pref_provider.h",
29     "content_settings_provider.h",
30     "content_settings_registry.cc",
31     "content_settings_registry.h",
32     "content_settings_rule.cc",
33     "content_settings_rule.h",
34     "content_settings_usages_state.cc",
35     "content_settings_usages_state.h",
36     "content_settings_utils.cc",
37     "content_settings_utils.h",
38     "cookie_settings.cc",
39     "cookie_settings.h",
40     "host_content_settings_map.cc",
41     "host_content_settings_map.h",
42     "local_shared_objects_counter.h",
43     "website_settings_info.cc",
44     "website_settings_info.h",
45     "website_settings_registry.cc",
46     "website_settings_registry.h",
47   ]
49   if (enable_plugins) {
50     sources += [
51       "plugins_field_trial.cc",
52       "plugins_field_trial.h",
53     ]
54   }
56   deps = [
57     "//base",
58     "//base:prefs",
59     "//components/content_settings/core/common",
60     "//components/pref_registry:pref_registry",
61     "//components/url_formatter",
62     "//net",
63     "//url",
64   ]
66   if (enable_plugins) {
67     deps += [ "//components/plugins/common" ]
68   }
70   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
73 source_set("unit_tests") {
74   testonly = true
75   sources = [
76     "content_settings_mock_provider.cc",
77     "content_settings_mock_provider.h",
78     "content_settings_registry_unittest.cc",
79     "content_settings_rule_unittest.cc",
80     "content_settings_utils_unittest.cc",
81     "cookie_settings_unittest.cc",
82     "website_settings_registry_unittest.cc",
83   ]
85   if (enable_plugins) {
86     sources += [
87       "content_settings_provider_unittest.cc",
88       "plugins_field_trial_unittest.cc",
89     ]
90   }
92   deps = [
93     ":browser",
94     "//base",
95     "//components/content_settings/core/common",
96     "//components/content_settings/core/test:test_support",
97     "//testing/gtest",
98     "//url",
99   ]