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

Side by Side Diff: ios/chrome/browser/suggestions/image_fetcher_impl.h

Issue 2526773002: Move iOS ImageFetcher to ios/web/public (Closed)
Patch Set: Rename headers Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IOS_CHROME_BROWSER_SUGGESTIONS_IMAGE_FETCHER_IMPL_H_ 5 #ifndef IOS_CHROME_BROWSER_SUGGESTIONS_IMAGE_FETCHER_IMPL_H_
6 #define IOS_CHROME_BROWSER_SUGGESTIONS_IMAGE_FETCHER_IMPL_H_ 6 #define IOS_CHROME_BROWSER_SUGGESTIONS_IMAGE_FETCHER_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "components/image_fetcher/image_fetcher.h" 13 #include "components/image_fetcher/image_fetcher.h"
14 14
15 class GURL; 15 class GURL;
16 class ImageFetcher;
17 16
18 namespace base { 17 namespace base {
19 class SequencedWorkerPool; 18 class SequencedWorkerPool;
20 } 19 }
21 20
22 namespace gfx { 21 namespace gfx {
23 class Image; 22 class Image;
24 } 23 }
25 24
26 namespace image_fetcher { 25 namespace image_fetcher {
27 class ImageFetcherDelegate; 26 class ImageFetcherDelegate;
28 } 27 }
29 28
30 namespace net { 29 namespace net {
31 class URLRequestContextGetter; 30 class URLRequestContextGetter;
32 } 31 }
33 32
33 namespace web {
34 class ImageDataFetcher;
35 }
36
34 namespace suggestions { 37 namespace suggestions {
35 38
36 // A class used to fetch server images asynchronously. 39 // A class used to fetch server images asynchronously.
37 class ImageFetcherImpl : public image_fetcher::ImageFetcher { 40 class ImageFetcherImpl : public image_fetcher::ImageFetcher {
38 public: 41 public:
39 ImageFetcherImpl(net::URLRequestContextGetter* url_request_context, 42 ImageFetcherImpl(net::URLRequestContextGetter* url_request_context,
40 base::SequencedWorkerPool* blocking_pool); 43 base::SequencedWorkerPool* blocking_pool);
41 ~ImageFetcherImpl() override; 44 ~ImageFetcherImpl() override;
42 45
43 void SetImageFetcherDelegate( 46 void SetImageFetcherDelegate(
44 image_fetcher::ImageFetcherDelegate* delegate) override; 47 image_fetcher::ImageFetcherDelegate* delegate) override;
45 48
46 void SetDataUseServiceName(DataUseServiceName data_use_service_name) override; 49 void SetDataUseServiceName(DataUseServiceName data_use_service_name) override;
47 50
48 void StartOrQueueNetworkRequest( 51 void StartOrQueueNetworkRequest(
49 const std::string& id, 52 const std::string& id,
50 const GURL& image_url, 53 const GURL& image_url,
51 base::Callback<void(const std::string&, const gfx::Image&)> callback) 54 base::Callback<void(const std::string&, const gfx::Image&)> callback)
52 override; 55 override;
53 56
54 private: 57 private:
55 std::unique_ptr<::ImageFetcher> imageFetcher_; 58 std::unique_ptr<web::ImageDataFetcher> image_fetcher_;
56 59
57 image_fetcher::ImageFetcherDelegate* delegate_; 60 image_fetcher::ImageFetcherDelegate* delegate_;
58 61
59 DISALLOW_COPY_AND_ASSIGN(ImageFetcherImpl); 62 DISALLOW_COPY_AND_ASSIGN(ImageFetcherImpl);
60 }; 63 };
61 64
62 } // namespace suggestions 65 } // namespace suggestions
63 66
64 #endif // IOS_CHROME_BROWSER_SUGGESTIONS_IMAGE_FETCHER_IMPL_H_ 67 #endif // IOS_CHROME_BROWSER_SUGGESTIONS_IMAGE_FETCHER_IMPL_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/suggestions/BUILD.gn ('k') | ios/chrome/browser/suggestions/image_fetcher_impl.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698