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

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: Addressed comments round2 treib@ & added missing imports *sigh* 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..5084066938b88b791788b6723ca4cb14e6962af1 100644
--- a/chrome/browser/search/suggestions/suggestions_service_factory.cc
+++ b/chrome/browser/search/suggestions/suggestions_service_factory.cc
@@ -7,14 +7,16 @@
#include <memory>
#include <utility>
+#include "base/memory/ptr_util.h"
#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 +33,7 @@
#include "content/public/browser/browser_thread.h"
using content::BrowserThread;
+using image_fetcher::ImageFetcherImpl;
namespace suggestions {
@@ -83,7 +86,9 @@ KeyedService* SuggestionsServiceFactory::BuildServiceInstanceFor(
profile->GetPath().Append(FILE_PATH_LITERAL("Thumbnails")));
std::unique_ptr<ImageFetcherImpl> image_fetcher(
- new ImageFetcherImpl(profile->GetRequestContext()));
+ new ImageFetcherImpl(
+ base::MakeUnique<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)));
« no previous file with comments | « chrome/browser/search/suggestions/image_fetcher_impl_browsertest.cc ('k') | chrome/browser/search/thumbnail_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698