Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1630)

Unified Diff: chrome/browser/favicon/large_icon_service_factory.cc

Issue 2685173002: Extend LargeIconService to fetch missing favicons from a Google server (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/favicon/core/BUILD.gn » ('j') | components/favicon/core/large_icon_service.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/favicon/large_icon_service_factory.cc
diff --git a/chrome/browser/favicon/large_icon_service_factory.cc b/chrome/browser/favicon/large_icon_service_factory.cc
index f906a86a1be8c9ff9e28fa370a62f7cf24e33605..38b789a95bb5c588f00a88b20fbdb98ba5672e3c 100644
--- a/chrome/browser/favicon/large_icon_service_factory.cc
+++ b/chrome/browser/favicon/large_icon_service_factory.cc
@@ -8,8 +8,11 @@
#include "chrome/browser/favicon/favicon_service_factory.h"
#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/search/suggestions/image_decoder_impl.h"
#include "components/favicon/core/favicon_service.h"
#include "components/favicon/core/large_icon_service.h"
+#include "components/image_fetcher/image_decoder.h"
+#include "components/image_fetcher/image_fetcher_impl.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
@@ -42,13 +45,17 @@ content::BrowserContext* LargeIconServiceFactory::GetBrowserContextToUse(
KeyedService* LargeIconServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
+ Profile* profile = Profile::FromBrowserContext(context);
favicon::FaviconService* favicon_service =
- FaviconServiceFactory::GetForProfile(Profile::FromBrowserContext(context),
+ FaviconServiceFactory::GetForProfile(profile,
ServiceAccessType::EXPLICIT_ACCESS);
return new favicon::LargeIconService(
favicon_service, content::BrowserThread::GetBlockingPool()
->GetTaskRunnerWithShutdownBehavior(
- base::SequencedWorkerPool::SKIP_ON_SHUTDOWN));
+ base::SequencedWorkerPool::SKIP_ON_SHUTDOWN),
+ base::MakeUnique<image_fetcher::ImageFetcherImpl>(
+ base::MakeUnique<suggestions::ImageDecoderImpl>(),
+ profile->GetRequestContext()));
}
bool LargeIconServiceFactory::ServiceIsNULLWhileTesting() const {
« no previous file with comments | « no previous file | components/favicon/core/BUILD.gn » ('j') | components/favicon/core/large_icon_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698