# 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", "reading_list/reading_list_suggestions_provider.cc", "reading_list/reading_list_suggestions_provider.h", "remote/json_request.cc", "remote/json_request.h", "remote/persistent_scheduler.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_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.cc", "remote/remote_suggestions_status_service.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", "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", "//components/version_info", "//google_apis", "//net", "//ui/base", "//url", ] deps = [ "//components/bookmarks/browser", "//components/data_use_measurement/core", "//components/favicon/core", "//components/favicon_base", "//components/history/core/browser", "//components/image_fetcher/core", "//components/metrics", "//components/ntp_snippets/remote/proto", "//components/offline_pages/core", "//components/offline_pages/core/downloads:offline_pages_ui_adapter", "//components/offline_pages/core/recent_tabs", "//components/physical_web/data_source", "//components/reading_list/core", "//components/sessions", "//components/strings", "//components/sync_sessions", "//components/translate/core/browser", "//components/url_formatter", "//components/variations", "//components/variations/net", "//components/web_resource", "//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", "content_suggestions_service.cc", ] } } 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", "reading_list/reading_list_suggestions_provider_unittest.cc", "remote/json_request_unittest.cc", "remote/remote_suggestion_unittest.cc", "remote/remote_suggestions_database_unittest.cc", "remote/remote_suggestions_fetcher_unittest.cc", "remote/remote_suggestions_provider_impl_unittest.cc", "remote/remote_suggestions_scheduler_impl_unittest.cc", "remote/remote_suggestions_status_service_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", "user_classifier_unittest.cc", ] deps = [ ":ntp_snippets", ":test_support", "//base", "//base/test:test_support", "//components/bookmarks/browser", "//components/bookmarks/test", "//components/image_fetcher/core", "//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/offline_pages/core/downloads:offline_pages_ui_adapter", "//components/offline_pages/core/recent_tabs", "//components/physical_web/data_source:test_support", "//components/reading_list/core", "//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", "//components/web_resource:web_resource", "//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", ] }