mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-28 00:06:09 +03:00
321 lines
11 KiB
Plaintext
321 lines
11 KiB
Plaintext
# 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")
|
|
|
|
import("//third_party/protobuf/proto_library.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",
|
|
"breaking_news/breaking_news_listener.h",
|
|
"breaking_news/breaking_news_metrics.cc",
|
|
"breaking_news/breaking_news_metrics.h",
|
|
"breaking_news/subscription_json_request.cc",
|
|
"breaking_news/subscription_json_request.h",
|
|
"breaking_news/subscription_manager.cc",
|
|
"breaking_news/subscription_manager.h",
|
|
"breaking_news/subscription_manager_impl.cc",
|
|
"breaking_news/subscription_manager_impl.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",
|
|
"contextual/contextual_content_suggestions_service.cc",
|
|
"contextual/contextual_content_suggestions_service.h",
|
|
"contextual/contextual_content_suggestions_service_proxy.cc",
|
|
"contextual/contextual_content_suggestions_service_proxy.h",
|
|
"contextual/contextual_suggestion.cc",
|
|
"contextual/contextual_suggestion.h",
|
|
"contextual/contextual_suggestions_composite_reporter.cc",
|
|
"contextual/contextual_suggestions_composite_reporter.h",
|
|
"contextual/contextual_suggestions_debugging_reporter.cc",
|
|
"contextual/contextual_suggestions_debugging_reporter.h",
|
|
"contextual/contextual_suggestions_features.cc",
|
|
"contextual/contextual_suggestions_features.h",
|
|
"contextual/contextual_suggestions_fetch.cc",
|
|
"contextual/contextual_suggestions_fetch.h",
|
|
"contextual/contextual_suggestions_fetcher.h",
|
|
"contextual/contextual_suggestions_fetcher_impl.cc",
|
|
"contextual/contextual_suggestions_fetcher_impl.h",
|
|
"contextual/contextual_suggestions_metrics_reporter.cc",
|
|
"contextual/contextual_suggestions_metrics_reporter.h",
|
|
"contextual/contextual_suggestions_reporter.cc",
|
|
"contextual/contextual_suggestions_reporter.h",
|
|
"contextual/contextual_suggestions_result.cc",
|
|
"contextual/contextual_suggestions_result.h",
|
|
"contextual/contextual_suggestions_ukm_entry.cc",
|
|
"contextual/contextual_suggestions_ukm_entry.h",
|
|
"features.cc",
|
|
"features.h",
|
|
"logger.cc",
|
|
"logger.h",
|
|
"ntp_snippets_constants.cc",
|
|
"ntp_snippets_constants.h",
|
|
"pref_names.cc",
|
|
"pref_names.h",
|
|
"pref_util.cc",
|
|
"pref_util.h",
|
|
"reading_list/reading_list_suggestions_provider.cc",
|
|
"reading_list/reading_list_suggestions_provider.h",
|
|
"remote/cached_image_fetcher.cc",
|
|
"remote/cached_image_fetcher.h",
|
|
"remote/json_request.cc",
|
|
"remote/json_request.h",
|
|
"remote/json_to_categories.cc",
|
|
"remote/json_to_categories.h",
|
|
"remote/persistent_scheduler.h",
|
|
"remote/prefetched_pages_tracker.h",
|
|
"remote/prefetched_pages_tracker_impl.cc",
|
|
"remote/prefetched_pages_tracker_impl.h",
|
|
"remote/remote_suggestion.cc",
|
|
"remote/remote_suggestion.h",
|
|
"remote/remote_suggestions_database.cc",
|
|
"remote/remote_suggestions_database.h",
|
|
"remote/remote_suggestions_fetcher.cc",
|
|
"remote/remote_suggestions_fetcher.h",
|
|
"remote/remote_suggestions_fetcher_impl.cc",
|
|
"remote/remote_suggestions_fetcher_impl.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_scheduler_impl.cc",
|
|
"remote/remote_suggestions_scheduler_impl.h",
|
|
"remote/remote_suggestions_status_service.h",
|
|
"remote/remote_suggestions_status_service_impl.cc",
|
|
"remote/remote_suggestions_status_service_impl.h",
|
|
"remote/request_params.cc",
|
|
"remote/request_params.h",
|
|
"remote/request_throttler.cc",
|
|
"remote/request_throttler.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",
|
|
"time_serialization.cc",
|
|
"time_serialization.h",
|
|
"user_classifier.cc",
|
|
"user_classifier.h",
|
|
]
|
|
|
|
if (is_android) {
|
|
sources += [
|
|
"breaking_news/breaking_news_gcm_app_handler.cc",
|
|
"breaking_news/breaking_news_gcm_app_handler.h",
|
|
]
|
|
}
|
|
|
|
public_deps = [
|
|
"//base",
|
|
"//components/keyed_service/core",
|
|
"//components/leveldb_proto",
|
|
"//components/prefs",
|
|
"//components/resources",
|
|
"//components/sync",
|
|
"//components/version_info",
|
|
"//net",
|
|
"//ui/base",
|
|
"//url",
|
|
]
|
|
|
|
deps = [
|
|
":explore_protos",
|
|
"//components/bookmarks/browser",
|
|
"//components/data_use_measurement/core",
|
|
"//components/favicon/core",
|
|
"//components/favicon_base",
|
|
"//components/gcm_driver",
|
|
"//components/history/core/browser",
|
|
"//components/image_fetcher/core",
|
|
"//components/language/core/browser",
|
|
"//components/metrics",
|
|
"//components/ntp_snippets/remote/proto",
|
|
"//components/offline_pages/core",
|
|
"//components/reading_list/core",
|
|
"//components/sessions",
|
|
"//components/strings",
|
|
"//components/sync_sessions",
|
|
"//components/url_formatter",
|
|
"//components/variations",
|
|
"//components/variations/net",
|
|
"//components/variations/service",
|
|
"//components/web_resource",
|
|
"//services/identity/public/cpp",
|
|
"//services/metrics/public/cpp:metrics_cpp",
|
|
"//services/metrics/public/cpp:ukm_builders",
|
|
"//services/network/public/cpp",
|
|
"//services/network/public/mojom",
|
|
"//third_party/icu/",
|
|
"//third_party/protobuf:protobuf_lite",
|
|
"//ui/gfx",
|
|
]
|
|
}
|
|
|
|
if (is_android) {
|
|
java_cpp_enum("ntp_snippets_java_enums_srcjar") {
|
|
sources = [
|
|
"category.h",
|
|
"category_info.h",
|
|
"category_status.h",
|
|
"content_suggestions_service.cc",
|
|
"contextual/contextual_suggestions_reporter.h",
|
|
]
|
|
}
|
|
}
|
|
|
|
proto_library("explore_protos") {
|
|
sources = [
|
|
"contextual/proto/chrome_search_api_request_context.proto",
|
|
"contextual/proto/get_pivots_request.proto",
|
|
"contextual/proto/get_pivots_response.proto",
|
|
]
|
|
}
|
|
|
|
source_set("unit_tests") {
|
|
testonly = true
|
|
sources = [
|
|
"bookmarks/bookmark_last_visit_utils_unittest.cc",
|
|
"bookmarks/bookmark_suggestions_provider_unittest.cc",
|
|
"breaking_news/subscription_json_request_unittest.cc",
|
|
"breaking_news/subscription_manager_impl_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",
|
|
"contextual/contextual_content_suggestions_service_proxy_unittest.cc",
|
|
"contextual/contextual_content_suggestions_service_unittest.cc",
|
|
"contextual/contextual_suggestions_composite_reporter_unittest.cc",
|
|
"contextual/contextual_suggestions_fetch_unittest.cc",
|
|
"contextual/contextual_suggestions_fetcher_impl_unittest.cc",
|
|
"contextual/contextual_suggestions_metrics_reporter_unittest.cc",
|
|
"contextual/contextual_suggestions_ukm_entry_unittest.cc",
|
|
"logger_unittest.cc",
|
|
"reading_list/reading_list_suggestions_provider_unittest.cc",
|
|
"remote/cached_image_fetcher_unittest.cc",
|
|
"remote/json_request_unittest.cc",
|
|
"remote/prefetched_pages_tracker_impl_unittest.cc",
|
|
"remote/remote_suggestion_unittest.cc",
|
|
"remote/remote_suggestions_database_unittest.cc",
|
|
"remote/remote_suggestions_fetcher_impl_unittest.cc",
|
|
"remote/remote_suggestions_provider_impl_unittest.cc",
|
|
"remote/remote_suggestions_scheduler_impl_unittest.cc",
|
|
"remote/remote_suggestions_status_service_impl_unittest.cc",
|
|
"remote/request_throttler_unittest.cc",
|
|
"remote/test_utils.cc",
|
|
"remote/test_utils.h",
|
|
"sessions/foreign_sessions_suggestions_provider_unittest.cc",
|
|
"sessions/tab_delegate_sync_adapter_unittest.cc",
|
|
"time_serialization_unittest.cc",
|
|
"user_classifier_unittest.cc",
|
|
]
|
|
|
|
if (is_android) {
|
|
sources += [ "breaking_news/breaking_news_gcm_app_handler_unittest.cc" ]
|
|
}
|
|
|
|
deps = [
|
|
":explore_protos",
|
|
":ntp_snippets",
|
|
":test_support",
|
|
"//base",
|
|
"//base/test:test_support",
|
|
"//components/bookmarks/browser",
|
|
"//components/bookmarks/test",
|
|
"//components/gcm_driver",
|
|
"//components/gcm_driver/instance_id",
|
|
"//components/image_fetcher/core",
|
|
"//components/image_fetcher/core:test_support",
|
|
"//components/leveldb_proto:test_support",
|
|
"//components/ntp_snippets/remote/proto",
|
|
"//components/offline_pages/core",
|
|
"//components/offline_pages/core:test_support",
|
|
"//components/offline_pages/core/background:test_support",
|
|
"//components/prefs:test_support",
|
|
"//components/reading_list/core",
|
|
"//components/sessions",
|
|
"//components/sessions:test_support",
|
|
"//components/strings",
|
|
"//components/sync:test_support_driver",
|
|
"//components/sync_preferences:test_support",
|
|
"//components/sync_sessions",
|
|
"//components/ukm:test_support",
|
|
"//components/variations:test_support",
|
|
"//components/web_resource:web_resource",
|
|
"//google_apis/gcm",
|
|
"//net:test_support",
|
|
"//services/identity/public/cpp",
|
|
"//services/identity/public/cpp:test_support",
|
|
"//services/metrics/public/cpp:ukm_builders",
|
|
"//services/network:test_support",
|
|
"//services/network/public/cpp",
|
|
"//services/network/public/mojom",
|
|
"//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",
|
|
"contextual/contextual_suggestions_test_utils.cc",
|
|
"contextual/contextual_suggestions_test_utils.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",
|
|
"remote/remote_suggestion_builder.cc",
|
|
"remote/remote_suggestion_builder.h",
|
|
]
|
|
|
|
deps = [
|
|
":ntp_snippets",
|
|
"//base",
|
|
"//components/ntp_snippets/remote/proto",
|
|
"//components/offline_pages/core",
|
|
"//components/offline_pages/core:test_support",
|
|
"//testing/gmock",
|
|
"//testing/gtest",
|
|
]
|
|
}
|