OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//third_party/protobuf/proto_library.gni") | 5 import("//third_party/protobuf/proto_library.gni") |
6 | 6 |
7 # These values are duplicated in the GYP build in: | 7 # These values are duplicated in the GYP build in: |
8 # //components/precache/precache_defines.gypi | 8 # //components/precache/precache_defines.gypi |
9 precache_config_settings_url = | 9 precache_config_settings_url = |
10 "https://www.gstatic.com/chrome/wifiprefetch/precache_config" | 10 "https://www.gstatic.com/chrome/wifiprefetch/precache_config" |
11 precache_manifest_url_prefix = | 11 precache_manifest_url_prefix = |
12 "https://www.gstatic.com/chrome/wifiprefetch/hosts/" | 12 "https://www.gstatic.com/chrome/wifiprefetch/hosts/" |
13 | 13 |
14 config("precache_config") { | 14 config("precache_config") { |
15 defines = [ | 15 defines = [ |
16 "PRECACHE_CONFIG_SETTINGS_URL=\"$precache_config_settings_url\"", | 16 "PRECACHE_CONFIG_SETTINGS_URL=\"$precache_config_settings_url\"", |
17 "PRECACHE_MANIFEST_URL_PREFIX=\"$precache_manifest_url_prefix\"", | 17 "PRECACHE_MANIFEST_URL_PREFIX=\"$precache_manifest_url_prefix\"", |
18 ] | 18 ] |
19 } | 19 } |
20 | 20 |
21 static_library("core") { | 21 static_library("core") { |
22 sources = [ | 22 sources = [ |
23 "fetcher_pool.h", | 23 "fetcher_pool.h", |
24 "precache_database.cc", | 24 "precache_database.cc", |
25 "precache_database.h", | 25 "precache_database.h", |
26 "precache_fetcher.cc", | 26 "precache_fetcher.cc", |
27 "precache_fetcher.h", | 27 "precache_fetcher.h", |
| 28 "precache_referrer_host_table.cc", |
| 29 "precache_referrer_host_table.h", |
28 "precache_session_table.cc", | 30 "precache_session_table.cc", |
29 "precache_session_table.h", | 31 "precache_session_table.h", |
30 "precache_switches.cc", | 32 "precache_switches.cc", |
31 "precache_switches.h", | 33 "precache_switches.h", |
32 "precache_url_table.cc", | 34 "precache_url_table.cc", |
33 "precache_url_table.h", | 35 "precache_url_table.h", |
34 ] | 36 ] |
35 | 37 |
36 # Note the GYP build sets this as direct dependent settings, but this is | 38 # Note the GYP build sets this as direct dependent settings, but this is |
37 # only used to share the settings with the unit tests. Instead, we just | 39 # only used to share the settings with the unit tests. Instead, we just |
(...skipping 18 matching lines...) Expand all Loading... |
56 "proto/unfinished_work.proto", | 58 "proto/unfinished_work.proto", |
57 ] | 59 ] |
58 } | 60 } |
59 | 61 |
60 source_set("unit_tests") { | 62 source_set("unit_tests") { |
61 testonly = true | 63 testonly = true |
62 sources = [ | 64 sources = [ |
63 "fetcher_pool_unittest.cc", | 65 "fetcher_pool_unittest.cc", |
64 "precache_database_unittest.cc", | 66 "precache_database_unittest.cc", |
65 "precache_fetcher_unittest.cc", | 67 "precache_fetcher_unittest.cc", |
| 68 "precache_referrer_host_table_unittest.cc", |
66 "precache_session_table_unittest.cc", | 69 "precache_session_table_unittest.cc", |
67 "precache_url_table_unittest.cc", | 70 "precache_url_table_unittest.cc", |
68 ] | 71 ] |
69 | 72 |
70 configs += [ ":precache_config" ] | 73 configs += [ ":precache_config" ] |
71 | 74 |
72 deps = [ | 75 deps = [ |
73 ":core", | 76 ":core", |
74 ":proto", | 77 ":proto", |
75 "//base", | 78 "//base", |
76 "//base/test:test_support", | 79 "//base/test:test_support", |
77 "//components/history/core/browser", | 80 "//components/history/core/browser", |
78 "//net:test_support", | 81 "//net:test_support", |
79 "//sql", | 82 "//sql", |
80 "//testing/gmock", | 83 "//testing/gmock", |
81 "//testing/gtest", | 84 "//testing/gtest", |
82 ] | 85 ] |
83 } | 86 } |
OLD | NEW |