OLD | NEW |
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> |
| 9 |
8 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
9 #include "base/macros.h" | 11 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "components/suggestions/image_fetcher.h" | 12 #include "components/suggestions/image_fetcher.h" |
12 | 13 |
13 class GURL; | 14 class GURL; |
14 class SkBitmap; | 15 class SkBitmap; |
15 | 16 |
16 namespace image_fetcher { | 17 namespace image_fetcher { |
17 class ImageFetcher; | 18 class ImageFetcher; |
18 } | 19 } |
19 | 20 |
20 namespace base { | 21 namespace base { |
(...skipping 16 matching lines...) Expand all Loading... |
37 ~ImageFetcherImpl() override; | 38 ~ImageFetcherImpl() override; |
38 | 39 |
39 void SetImageFetcherDelegate(ImageFetcherDelegate* delegate) override; | 40 void SetImageFetcherDelegate(ImageFetcherDelegate* delegate) override; |
40 | 41 |
41 void StartOrQueueNetworkRequest( | 42 void StartOrQueueNetworkRequest( |
42 const GURL& url, | 43 const GURL& url, |
43 const GURL& image_url, | 44 const GURL& image_url, |
44 base::Callback<void(const GURL&, const SkBitmap*)> callback) override; | 45 base::Callback<void(const GURL&, const SkBitmap*)> callback) override; |
45 | 46 |
46 private: | 47 private: |
47 scoped_ptr<image_fetcher::ImageFetcher> imageFetcher_; | 48 std::unique_ptr<image_fetcher::ImageFetcher> imageFetcher_; |
48 | 49 |
49 ImageFetcherDelegate* delegate_; | 50 ImageFetcherDelegate* delegate_; |
50 | 51 |
51 DISALLOW_COPY_AND_ASSIGN(ImageFetcherImpl); | 52 DISALLOW_COPY_AND_ASSIGN(ImageFetcherImpl); |
52 }; | 53 }; |
53 | 54 |
54 } // namespace suggestions | 55 } // namespace suggestions |
55 | 56 |
56 #endif // IOS_CHROME_BROWSER_SUGGESTIONS_IMAGE_FETCHER_IMPL_H_ | 57 #endif // IOS_CHROME_BROWSER_SUGGESTIONS_IMAGE_FETCHER_IMPL_H_ |
OLD | NEW |