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

Unified Diff: chrome/browser/ntp_snippets/ntp_snippets_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/ntp_snippets/ntp_snippets_service_factory.cc
diff --git a/chrome/browser/ntp_snippets/ntp_snippets_service_factory.cc b/chrome/browser/ntp_snippets/ntp_snippets_service_factory.cc
index 33bf65a31084ab033f36b7833227164c3bb86e49..20adaf390bd8f03e6cd951bdccb62140a6ed6910 100644
--- a/chrome/browser/ntp_snippets/ntp_snippets_service_factory.cc
+++ b/chrome/browser/ntp_snippets/ntp_snippets_service_factory.cc
@@ -11,7 +11,6 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search/suggestions/image_decoder_impl.h"
-#include "chrome/browser/search/suggestions/image_fetcher_impl.h"
#include "chrome/browser/search/suggestions/suggestions_service_factory.h"
#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
#include "chrome/browser/signin/signin_manager_factory.h"
@@ -21,6 +20,7 @@
#include "components/browser_sync/browser/profile_sync_service.h"
#include "components/image_fetcher/image_decoder.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/ntp_snippets/ntp_snippets_constants.h"
#include "components/ntp_snippets/ntp_snippets_database.h"
@@ -44,8 +44,8 @@
#endif // OS_ANDROID
using content::BrowserThread;
+using image_fetcher::ImageFetcherImpl;
using suggestions::ImageDecoderImpl;
-using suggestions::ImageFetcherImpl;
using suggestions::SuggestionsService;
using suggestions::SuggestionsServiceFactory;
@@ -118,7 +118,8 @@ KeyedService* NTPSnippetsServiceFactory::BuildServiceInstanceFor(
signin_manager, token_service, request_context,
base::Bind(&safe_json::SafeJsonParser::Parse),
chrome::GetChannel() == version_info::Channel::STABLE),
- base::MakeUnique<ImageFetcherImpl>(request_context.get()),
+ base::MakeUnique<ImageFetcherImpl>(new suggestions::ImageDecoderImpl(),
Marc Treib 2016/06/29 13:57:33 "suggestions::" isn't required, there's a "using"
markusheintz_ 2016/06/29 14:36:45 Done.
+ request_context.get()),
base::MakeUnique<ImageDecoderImpl>(),
base::MakeUnique<ntp_snippets::NTPSnippetsDatabase>(database_dir,
task_runner),
« no previous file with comments | « no previous file | chrome/browser/search/suggestions/image_fetcher_impl.h » ('j') | components/image_fetcher/image_fetcher_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698