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

Unified Diff: ios/chrome/browser/suggestions/image_fetcher_impl.h

Issue 790773003: Upstream iOS SuggestionsServiceFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@436897.1
Patch Set: Rebase Created 6 years 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 | « ios/chrome/browser/suggestions/OWNERS ('k') | ios/chrome/browser/suggestions/image_fetcher_impl.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/suggestions/image_fetcher_impl.h
diff --git a/ios/chrome/browser/suggestions/image_fetcher_impl.h b/ios/chrome/browser/suggestions/image_fetcher_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..6a6ecedb7e0990ba6dab8ea6ecf775c1a53722c4
--- /dev/null
+++ b/ios/chrome/browser/suggestions/image_fetcher_impl.h
@@ -0,0 +1,55 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_CHROME_BROWSER_SUGGESTIONS_IMAGE_FETCHER_IMPL_H_
+#define IOS_CHROME_BROWSER_SUGGESTIONS_IMAGE_FETCHER_IMPL_H_
+
+#include "base/callback_forward.h"
+#include "base/memory/scoped_ptr.h"
+#include "components/suggestions/image_fetcher.h"
+
+class GURL;
+class SkBitmap;
+
+namespace image_fetcher {
+class ImageFetcher;
+}
+
+namespace base {
+class SequencedWorkerPool;
+}
+
+namespace net {
+class URLRequestContextGetter;
+}
+
+namespace suggestions {
+
+class ImageFetcherDelegate;
+
+// A class used to fetch server images asynchronously.
+class ImageFetcherImpl : public suggestions::ImageFetcher {
+ public:
+ ImageFetcherImpl(net::URLRequestContextGetter* url_request_context,
+ base::SequencedWorkerPool* blocking_pool);
+ ~ImageFetcherImpl() override;
+
+ void SetImageFetcherDelegate(ImageFetcherDelegate* delegate) override;
+
+ void StartOrQueueNetworkRequest(
+ const GURL& url,
+ const GURL& image_url,
+ base::Callback<void(const GURL&, const SkBitmap*)> callback) override;
+
+ private:
+ scoped_ptr<image_fetcher::ImageFetcher> imageFetcher_;
+
+ ImageFetcherDelegate* delegate_;
+
+ DISALLOW_COPY_AND_ASSIGN(ImageFetcherImpl);
+};
+
+} // namespace suggestions
+
+#endif // IOS_CHROME_BROWSER_SUGGESTIONS_IMAGE_FETCHER_IMPL_H_
« no previous file with comments | « ios/chrome/browser/suggestions/OWNERS ('k') | ios/chrome/browser/suggestions/image_fetcher_impl.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698