1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
|
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/ui.gni")
if (is_android) {
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
}
static_library("ntp_snippets") {
sources = [
"bookmarks/bookmark_last_visit_utils.cc",
"bookmarks/bookmark_last_visit_utils.h",
"bookmarks/bookmark_suggestions_provider.cc",
"bookmarks/bookmark_suggestions_provider.h",
"callbacks.h",
"category.cc",
"category.h",
"category_info.cc",
"category_info.h",
"category_rankers/category_ranker.h",
"category_rankers/click_based_category_ranker.cc",
"category_rankers/click_based_category_ranker.h",
"category_rankers/constant_category_ranker.cc",
"category_rankers/constant_category_ranker.h",
"category_status.cc",
"category_status.h",
"content_suggestion.cc",
"content_suggestion.h",
"content_suggestions_metrics.cc",
"content_suggestions_metrics.h",
"content_suggestions_provider.cc",
"content_suggestions_provider.h",
"content_suggestions_service.cc",
"content_suggestions_service.h",
"features.cc",
"features.h",
"ntp_snippets_constants.cc",
"ntp_snippets_constants.h",
"offline_pages/recent_tab_suggestions_provider.cc",
"offline_pages/recent_tab_suggestions_provider.h",
"physical_web_pages/physical_web_page_suggestions_provider.cc",
"physical_web_pages/physical_web_page_suggestions_provider.h",
"pref_names.cc",
"pref_names.h",
"pref_util.cc",
"pref_util.h",
"remote/json_request.cc",
"remote/json_request.h",
"remote/ntp_snippet.cc",
"remote/ntp_snippet.h",
"remote/persistent_scheduler.h",
"remote/remote_suggestions_database.cc",
"remote/remote_suggestions_database.h",
"remote/remote_suggestions_fetcher.cc",
"remote/remote_suggestions_fetcher.h",
"remote/remote_suggestions_provider.cc",
"remote/remote_suggestions_provider.h",
"remote/remote_suggestions_provider_impl.cc",
"remote/remote_suggestions_provider_impl.h",
"remote/remote_suggestions_scheduler.h",
"remote/remote_suggestions_status_service.cc",
"remote/remote_suggestions_status_service.h",
"remote/request_params.cc",
"remote/request_params.h",
"remote/request_throttler.cc",
"remote/request_throttler.h",
"remote/scheduling_remote_suggestions_provider.cc",
"remote/scheduling_remote_suggestions_provider.h",
"sessions/foreign_sessions_suggestions_provider.cc",
"sessions/foreign_sessions_suggestions_provider.h",
"sessions/tab_delegate_sync_adapter.cc",
"sessions/tab_delegate_sync_adapter.h",
"status.cc",
"status.h",
"switches.cc",
"switches.h",
"user_classifier.cc",
"user_classifier.h",
]
public_deps = [
"//base",
"//components/keyed_service/core",
"//components/leveldb_proto",
"//components/prefs",
"//components/resources",
"//components/signin/core/browser",
"//components/sync",
"//google_apis",
"//net",
"//ui/base",
"//url",
]
deps = [
"//components/bookmarks/browser",
"//components/data_use_measurement/core",
"//components/history/core/browser",
"//components/image_fetcher",
"//components/metrics",
"//components/ntp_snippets/remote/proto",
"//components/offline_pages/core",
"//components/physical_web/data_source",
"//components/sessions",
"//components/strings",
"//components/sync_sessions",
"//components/translate/core/browser",
"//components/variations",
"//components/variations/net",
"//third_party/icu/",
"//ui/gfx",
]
}
if (is_android) {
java_cpp_enum("ntp_snippets_java_enums_srcjar") {
sources = [
"category.h",
"category_info.h",
"category_status.h",
]
}
}
source_set("unit_tests") {
testonly = true
sources = [
"bookmarks/bookmark_last_visit_utils_unittest.cc",
"bookmarks/bookmark_suggestions_provider_unittest.cc",
"category_rankers/click_based_category_ranker_unittest.cc",
"category_rankers/constant_category_ranker_unittest.cc",
"category_unittest.cc",
"content_suggestions_metrics_unittest.cc",
"content_suggestions_service_unittest.cc",
"offline_pages/recent_tab_suggestions_provider_unittest.cc",
"physical_web_pages/physical_web_page_suggestions_provider_unittest.cc",
"remote/json_request_unittest.cc",
"remote/ntp_snippet_unittest.cc",
"remote/remote_suggestions_database_unittest.cc",
"remote/remote_suggestions_fetcher_unittest.cc",
"remote/remote_suggestions_provider_impl_unittest.cc",
"remote/remote_suggestions_status_service_unittest.cc",
"remote/request_throttler_unittest.cc",
"remote/scheduling_remote_suggestions_provider_unittest.cc",
"remote/test_utils.cc",
"remote/test_utils.h",
"sessions/foreign_sessions_suggestions_provider_unittest.cc",
"sessions/tab_delegate_sync_adapter_unittest.cc",
]
deps = [
":ntp_snippets",
":test_support",
"//base",
"//base/test:test_support",
"//components/bookmarks/browser",
"//components/bookmarks/test",
"//components/image_fetcher",
"//components/leveldb_proto:test_support",
"//components/ntp_snippets/remote/proto",
"//components/offline_pages/core",
"//components/offline_pages/core:test_support",
"//components/physical_web/data_source:test_support",
"//components/sessions",
"//components/sessions:test_support",
"//components/signin/core/browser:test_support",
"//components/signin/core/common",
"//components/strings",
"//components/sync:test_support_driver",
"//components/sync_sessions",
"//components/variations:test_support",
"//net:test_support",
"//testing/gtest",
"//third_party/icu/",
"//ui/gfx:test_support",
]
}
source_set("test_support") {
testonly = true
sources = [
"category_rankers/fake_category_ranker.cc",
"category_rankers/fake_category_ranker.h",
"category_rankers/mock_category_ranker.cc",
"category_rankers/mock_category_ranker.h",
"fake_content_suggestions_provider_observer.cc",
"fake_content_suggestions_provider_observer.h",
"mock_content_suggestions_provider.cc",
"mock_content_suggestions_provider.h",
"mock_content_suggestions_provider_observer.cc",
"mock_content_suggestions_provider_observer.h",
"offline_pages/offline_pages_test_utils.cc",
"offline_pages/offline_pages_test_utils.h",
]
deps = [
":ntp_snippets",
"//base",
"//components/offline_pages/core",
"//components/offline_pages/core:test_support",
"//testing/gmock",
"//testing/gtest",
]
}
|