| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_URL_FETCHER_H_ | 5 #ifndef CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_URL_FETCHER_H_ |
| 6 #define CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_URL_FETCHER_H_ | 6 #define CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_URL_FETCHER_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <string> | 9 #include <string> |
| 9 | 10 |
| 10 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "net/url_request/url_fetcher.h" | 13 #include "net/url_request/url_fetcher.h" |
| 14 #include "net/url_request/url_fetcher_delegate.h" | 14 #include "net/url_request/url_fetcher_delegate.h" |
| 15 | 15 |
| 16 class GURL; | 16 class GURL; |
| 17 | 17 |
| 18 namespace base { | 18 namespace base { |
| 19 class DictionaryValue; | 19 class DictionaryValue; |
| 20 } | 20 } |
| 21 | 21 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 const GURL& url, | 149 const GURL& url, |
| 150 net::URLFetcher::RequestType request_type, | 150 net::URLFetcher::RequestType request_type, |
| 151 Delegate* delegate, | 151 Delegate* delegate, |
| 152 int max_retries, | 152 int max_retries, |
| 153 const std::string& post_data_mime_type, | 153 const std::string& post_data_mime_type, |
| 154 const std::string& post_data, | 154 const std::string& post_data, |
| 155 const std::string& additional_headers); | 155 const std::string& additional_headers); |
| 156 void SetupRequestHeaders(); | 156 void SetupRequestHeaders(); |
| 157 static CloudPrintURLFetcherFactory* factory(); | 157 static CloudPrintURLFetcherFactory* factory(); |
| 158 | 158 |
| 159 scoped_ptr<net::URLFetcher> request_; | 159 std::unique_ptr<net::URLFetcher> request_; |
| 160 Delegate* delegate_; | 160 Delegate* delegate_; |
| 161 int num_retries_; | 161 int num_retries_; |
| 162 std::string additional_headers_; | 162 std::string additional_headers_; |
| 163 std::string post_data_mime_type_; | 163 std::string post_data_mime_type_; |
| 164 std::string post_data_; | 164 std::string post_data_; |
| 165 | 165 |
| 166 RequestType type_; | 166 RequestType type_; |
| 167 base::Time start_time_; | 167 base::Time start_time_; |
| 168 }; | 168 }; |
| 169 | 169 |
| 170 typedef CloudPrintURLFetcher::Delegate CloudPrintURLFetcherDelegate; | 170 typedef CloudPrintURLFetcher::Delegate CloudPrintURLFetcherDelegate; |
| 171 | 171 |
| 172 } // namespace cloud_print | 172 } // namespace cloud_print |
| 173 | 173 |
| 174 #endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_URL_FETCHER_H_ | 174 #endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_URL_FETCHER_H_ |
| OLD | NEW |