Commit f1185cf2 authored by Scott Violet's avatar Scott Violet Committed by Commit Bot

favicon: moves FaviconServiceImpl into it's own target

This is in preparation for using favicons in WebLayer, which won't
use history.

BUG=1076463
TEST=covered by tests

Change-Id: I4adc5bd015cfdda16e3189f30df5a854dc0a4a05
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2305038Reviewed-by: default avatarPeter Kotwicz <pkotwicz@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789675}
parent 6c7f5c78
...@@ -1911,6 +1911,7 @@ static_library("browser") { ...@@ -1911,6 +1911,7 @@ static_library("browser") {
"//components/error_page/common", "//components/error_page/common",
"//components/favicon/content", "//components/favicon/content",
"//components/favicon/core", "//components/favicon/core",
"//components/favicon/core:history_implementation",
"//components/favicon_base", "//components/favicon_base",
"//components/feature_engagement", "//components/feature_engagement",
"//components/federated_learning", "//components/federated_learning",
......
...@@ -15,8 +15,6 @@ static_library("core") { ...@@ -15,8 +15,6 @@ static_library("core") {
"favicon_handler.cc", "favicon_handler.cc",
"favicon_handler.h", "favicon_handler.h",
"favicon_service.h", "favicon_service.h",
"favicon_service_impl.cc",
"favicon_service_impl.h",
"favicon_url.cc", "favicon_url.cc",
"favicon_url.h", "favicon_url.h",
"favicon_util.cc", "favicon_util.cc",
...@@ -35,7 +33,6 @@ static_library("core") { ...@@ -35,7 +33,6 @@ static_library("core") {
"//base", "//base",
"//base:i18n", "//base:i18n",
"//components/favicon_base", "//components/favicon_base",
"//components/history/core/browser",
"//components/image_fetcher/core", "//components/image_fetcher/core",
"//components/keyed_service/core", "//components/keyed_service/core",
"//net:net", "//net:net",
...@@ -46,6 +43,25 @@ static_library("core") { ...@@ -46,6 +43,25 @@ static_library("core") {
] ]
} }
# This target contains the implementation of FaviconService backed by
# the HistoryService.
static_library("history_implementation") {
sources = [
"favicon_service_impl.cc",
"favicon_service_impl.h",
]
deps = [
":core",
"//base",
"//components/favicon_base",
"//components/history/core/browser",
"//skia",
"//ui/gfx",
"//url",
]
}
source_set("unit_tests") { source_set("unit_tests") {
testonly = true testonly = true
sources = [ sources = [
...@@ -58,6 +74,7 @@ source_set("unit_tests") { ...@@ -58,6 +74,7 @@ source_set("unit_tests") {
deps = [ deps = [
":core", ":core",
":history_implementation",
"//base", "//base",
"//base/test:test_support", "//base/test:test_support",
"//components/favicon/core/test:test_support", "//components/favicon/core/test:test_support",
......
...@@ -20,7 +20,8 @@ class GURL; ...@@ -20,7 +20,8 @@ class GURL;
namespace favicon { namespace favicon {
// The large icon service provides methods to access large icons. // The large icon service provides methods to access large icons. The actual
// implementation of this uses Google's favicon service.
class LargeIconService : public KeyedService { class LargeIconService : public KeyedService {
public: public:
// Requests the best large icon for the page at |page_url|. // Requests the best large icon for the page at |page_url|.
......
...@@ -89,6 +89,7 @@ source_set("unit_tests") { ...@@ -89,6 +89,7 @@ source_set("unit_tests") {
"//base/test:test_support", "//base/test:test_support",
"//build:branding_buildflags", "//build:branding_buildflags",
"//components/favicon/core", "//components/favicon/core",
"//components/favicon/core:history_implementation",
"//components/favicon_base", "//components/favicon_base",
"//components/history/core/test", "//components/history/core/test",
"//components/image_fetcher/core", "//components/image_fetcher/core",
......
...@@ -23,6 +23,7 @@ source_set("favicon") { ...@@ -23,6 +23,7 @@ source_set("favicon") {
deps = [ deps = [
"//base", "//base",
"//components/favicon/core", "//components/favicon/core",
"//components/favicon/core:history_implementation",
"//components/favicon_base", "//components/favicon_base",
"//components/image_fetcher/core", "//components/image_fetcher/core",
"//components/image_fetcher/ios", "//components/image_fetcher/ios",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment