OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_WEB_WEBUI_URL_FETCHER_BLOCK_ADAPTER_H_ | 5 #ifndef IOS_WEB_WEBUI_URL_FETCHER_BLOCK_ADAPTER_H_ |
6 #define IOS_WEB_WEBUI_URL_FETCHER_BLOCK_ADAPTER_H_ | 6 #define IOS_WEB_WEBUI_URL_FETCHER_BLOCK_ADAPTER_H_ |
7 | 7 |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 | 9 |
| 10 #include <memory> |
| 11 |
10 #include "base/mac/scoped_block.h" | 12 #include "base/mac/scoped_block.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "net/url_request/url_fetcher_delegate.h" | 13 #include "net/url_request/url_fetcher_delegate.h" |
13 #include "url/gurl.h" | 14 #include "url/gurl.h" |
14 | 15 |
15 namespace net { | 16 namespace net { |
16 class URLFetcher; | 17 class URLFetcher; |
17 class URLRequestContextGetter; | 18 class URLRequestContextGetter; |
18 } // namespace net | 19 } // namespace net |
19 | 20 |
20 namespace web { | 21 namespace web { |
21 | 22 |
(...skipping 23 matching lines...) Expand all Loading... |
45 | 46 |
46 private: | 47 private: |
47 // The URL to fetch. | 48 // The URL to fetch. |
48 const GURL url_; | 49 const GURL url_; |
49 // The request context. | 50 // The request context. |
50 net::URLRequestContextGetter* request_context_; | 51 net::URLRequestContextGetter* request_context_; |
51 // Callback for resource load. | 52 // Callback for resource load. |
52 base::mac::ScopedBlock<web::URLFetcherBlockAdapterCompletion> | 53 base::mac::ScopedBlock<web::URLFetcherBlockAdapterCompletion> |
53 completion_handler_; | 54 completion_handler_; |
54 // URLFetcher for retrieving data from net stack. | 55 // URLFetcher for retrieving data from net stack. |
55 scoped_ptr<net::URLFetcher> fetcher_; | 56 std::unique_ptr<net::URLFetcher> fetcher_; |
56 }; | 57 }; |
57 | 58 |
58 } // namespace web | 59 } // namespace web |
59 | 60 |
60 #endif // IOS_WEB_WEBUI_URL_FETCHER_BLOCK_ADAPTER_H_ | 61 #endif // IOS_WEB_WEBUI_URL_FETCHER_BLOCK_ADAPTER_H_ |
OLD | NEW |