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

Unified Diff: chrome/browser/search/thumbnail_source.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
« no previous file with comments | « chrome/browser/search/suggestions/suggestions_service_factory.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/thumbnail_source.cc
diff --git a/chrome/browser/search/thumbnail_source.cc b/chrome/browser/search/thumbnail_source.cc
index 3d9faef32b4b53f1a03ae22f410e11713bfa2644..4ce99cc275e21ad51f81f9e653eb5e7a22df5e42 100644
--- a/chrome/browser/search/thumbnail_source.cc
+++ b/chrome/browser/search/thumbnail_source.cc
@@ -7,14 +7,16 @@
#include <stddef.h>
#include "base/callback.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted_memory.h"
#include "base/message_loop/message_loop.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search/instant_io_context.h"
-#include "chrome/browser/search/suggestions/image_fetcher_impl.h"
+#include "chrome/browser/search/suggestions/image_decoder_impl.h"
#include "chrome/browser/thumbnails/thumbnail_service.h"
#include "chrome/browser/thumbnails/thumbnail_service_factory.h"
#include "chrome/common/url_constants.h"
+#include "components/image_fetcher/image_fetcher_impl.h"
#include "components/suggestions/image_encoder.h"
#include "net/url_request/url_request.h"
#include "ui/gfx/image/image.h"
@@ -30,7 +32,9 @@ ThumbnailSource::ThumbnailSource(Profile* profile, bool capture_thumbnails)
capture_thumbnails_(capture_thumbnails),
weak_ptr_factory_(this) {
image_fetcher_.reset(
- new suggestions::ImageFetcherImpl(profile->GetRequestContext()));
+ new image_fetcher::ImageFetcherImpl(
+ base::MakeUnique<suggestions::ImageDecoderImpl>(),
+ profile->GetRequestContext()));
}
ThumbnailSource::~ThumbnailSource() {
« no previous file with comments | « chrome/browser/search/suggestions/suggestions_service_factory.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698