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

Unified Diff: chrome/browser/search/suggestions/suggestions_service_factory.cc

Issue 2074153002: Pass the ImageDecoder to the ImageFetcher at creation time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move image_fetcher_impl.* to components/image_fetcher Created 4 years, 6 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
Index: chrome/browser/search/suggestions/suggestions_service_factory.cc
diff --git a/chrome/browser/search/suggestions/suggestions_service_factory.cc b/chrome/browser/search/suggestions/suggestions_service_factory.cc
index c4e5679af0d5288daa4b15cfe41391a59f8d02ed..c84da1072178d4cc38bfb5376cfbed7b692b1e77 100644
--- a/chrome/browser/search/suggestions/suggestions_service_factory.cc
+++ b/chrome/browser/search/suggestions/suggestions_service_factory.cc
@@ -9,12 +9,13 @@
#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/search/suggestions/image_fetcher_impl.h"
+#include "chrome/browser/search/suggestions/image_decoder_impl.h"
#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "components/browser_sync/browser/profile_sync_service.h"
#include "components/image_fetcher/image_fetcher.h"
+#include "components/image_fetcher/image_fetcher_impl.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "components/leveldb_proto/proto_database.h"
#include "components/leveldb_proto/proto_database_impl.h"
@@ -31,6 +32,7 @@
#include "content/public/browser/browser_thread.h"
using content::BrowserThread;
+using image_fetcher::ImageFetcherImpl;
namespace suggestions {
@@ -83,7 +85,9 @@ KeyedService* SuggestionsServiceFactory::BuildServiceInstanceFor(
profile->GetPath().Append(FILE_PATH_LITERAL("Thumbnails")));
std::unique_ptr<ImageFetcherImpl> image_fetcher(
- new ImageFetcherImpl(profile->GetRequestContext()));
+ new ImageFetcherImpl(
+ new suggestions::ImageDecoderImpl(),
+ profile->GetRequestContext()));
std::unique_ptr<ImageManager> thumbnail_manager(new ImageManager(
std::move(image_fetcher), std::move(db), database_dir,
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB)));

Powered by Google App Engine
This is Rietveld 408576698