blob: 5102720c65f573e0c6f12f1c1ca3e26ac96b8556 [file] [log] [blame]
# 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",
"category.cc",
"category.h",
"category_factory.cc",
"category_factory.h",
"category_info.cc",
"category_info.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/offline_page_proxy.cc",
"offline_pages/offline_page_proxy.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/ntp_snippet.cc",
"remote/ntp_snippet.h",
"remote/ntp_snippets_database.cc",
"remote/ntp_snippets_database.h",
"remote/ntp_snippets_fetcher.cc",
"remote/ntp_snippets_fetcher.h",
"remote/ntp_snippets_scheduler.h",
"remote/ntp_snippets_service.cc",
"remote/ntp_snippets_service.h",
"remote/ntp_snippets_status_service.cc",
"remote/ntp_snippets_status_service.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",
"switches.cc",
"switches.h",
"user_classifier.cc",
"user_classifier.h",
]
public_deps = [
"//base",
"//components/keyed_service/core",
"//components/leveldb_proto",
"//components/prefs",
"//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",
"//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",
"category_factory_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/ntp_snippet_unittest.cc",
"remote/ntp_snippets_database_unittest.cc",
"remote/ntp_snippets_fetcher_unittest.cc",
"remote/ntp_snippets_service_unittest.cc",
"remote/ntp_snippets_status_service_unittest.cc",
"remote/ntp_snippets_test_utils.cc",
"remote/ntp_snippets_test_utils.h",
"remote/request_throttler_unittest.cc",
"sessions/foreign_sessions_suggestions_provider_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",
"//components/offline_pages: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",
"//net:test_support",
"//testing/gtest",
"//third_party/icu/",
"//ui/gfx:test_support",
]
}
source_set("test_support") {
testonly = true
sources = [
"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",
"//components/offline_pages:test_support",
"//testing/gmock",
]
}