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

Unified Diff: components/image_fetcher/image_fetcher_impl.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: components/image_fetcher/image_fetcher_impl.cc
diff --git a/chrome/browser/search/suggestions/image_fetcher_impl.cc b/components/image_fetcher/image_fetcher_impl.cc
similarity index 90%
rename from chrome/browser/search/suggestions/image_fetcher_impl.cc
rename to components/image_fetcher/image_fetcher_impl.cc
index 9d046f0a05ba7e381075b2a7b91af406c78d8b55..ed0c15c87d78ca7982a87c2c45974a96b69849a4 100644
--- a/chrome/browser/search/suggestions/image_fetcher_impl.cc
+++ b/components/image_fetcher/image_fetcher_impl.cc
@@ -2,23 +2,21 @@
// 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 <string>
#include "base/bind.h"
-#include "chrome/browser/search/suggestions/image_decoder_impl.h"
-#include "content/public/browser/browser_thread.h"
#include "net/base/load_flags.h"
#include "net/url_request/url_request_context_getter.h"
-#include "ui/gfx/image/image.h"
-namespace suggestions {
+namespace image_fetcher {
ImageFetcherImpl::ImageFetcherImpl(
+ image_fetcher::ImageDecoder* image_decoder,
net::URLRequestContextGetter* url_request_context)
: delegate_(nullptr), url_request_context_(url_request_context),
- image_decoder_(new suggestions::ImageDecoderImpl()),
+ image_decoder_(image_decoder),
image_data_fetcher_(
new image_fetcher::ImageDataFetcher(url_request_context_)) {
}
@@ -97,4 +95,4 @@ void ImageFetcherImpl::OnImageDecoded(const GURL& image_url,
pending_net_requests_.erase(image_iter);
}
-} // namespace suggestions
+} // namespace image_fetcher

Powered by Google App Engine
This is Rietveld 408576698