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

Unified Diff: chrome/browser/search/suggestions/image_fetcher_impl_browsertest.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/image_fetcher_impl_browsertest.cc
diff --git a/chrome/browser/search/suggestions/image_fetcher_impl_browsertest.cc b/chrome/browser/search/suggestions/image_fetcher_impl_browsertest.cc
index 57b9416043a2e74ce15e2168542bc9caf86fd8b3..ad7c2fe3781bacc2cfff938b0013547cac37a287 100644
--- a/chrome/browser/search/suggestions/image_fetcher_impl_browsertest.cc
+++ b/chrome/browser/search/suggestions/image_fetcher_impl_browsertest.cc
@@ -2,15 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/search/suggestions/image_fetcher_impl.h"
+#include "components/image_fetcher/image_fetcher_impl.h"
#include <memory>
#include "base/bind.h"
#include "base/files/file_path.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/search/suggestions/image_decoder_impl.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "components/image_fetcher/image_fetcher_delegate.h"
@@ -19,9 +21,8 @@
#include "ui/gfx/image/image.h"
#include "url/gurl.h"
-class SkBitmap;
-
using image_fetcher::ImageFetcher;
+using image_fetcher::ImageFetcherImpl;
using image_fetcher::ImageFetcherDelegate;
namespace suggestions {
@@ -75,7 +76,9 @@ class ImageFetcherImplBrowserTest : public InProcessBrowserTest {
ImageFetcherImpl* CreateImageFetcher() {
ImageFetcherImpl* fetcher =
- new ImageFetcherImpl(browser()->profile()->GetRequestContext());
+ new ImageFetcherImpl(
+ base::MakeUnique<suggestions::ImageDecoderImpl>(),
+ browser()->profile()->GetRequestContext());
fetcher->SetImageFetcherDelegate(&delegate_);
return fetcher;
}

Powered by Google App Engine
This is Rietveld 408576698