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

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

Issue 2721363002: Extend LargeIconService to fetch missing favicons from a Google server (Closed)
Patch Set: Add fallback_opts=TYPE Created 3 years, 9 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/data_use_measurement/core/data_use_user_data.h » ('j') | no next file with comments »
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 2272b2c05cfa46b010df2b87114c19d3cac0b261..318ea149354da3a5b14bddac47970216043c56af 100644
--- a/chrome/browser/favicon/large_icon_service_factory.cc
+++ b/chrome/browser/favicon/large_icon_service_factory.cc
@@ -9,8 +9,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/core/image_decoder.h"
+#include "components/image_fetcher/core/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"
@@ -43,13 +46,18 @@ 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));
+ favicon_service,
+ content::BrowserThread::GetBlockingPool()
+ ->GetTaskRunnerWithShutdownBehavior(
+ 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/data_use_measurement/core/data_use_user_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698