Chromium Code Reviews| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "content/public/common/url_fetcher.h" | 13 #include "content/public/common/url_fetcher.h" |
|
wtc
2012/05/23 01:34:01
We should not need to include this header now, rig
akalin
2012/05/23 04:33:09
True. But we do need to include net/url_request/u
| |
| 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 |
| 22 namespace net { | 22 namespace net { |
| 23 class URLRequestContextGetter; | 23 class URLRequestContextGetter; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 111 | 111 |
| 112 protected: | 112 protected: |
| 113 friend class base::RefCountedThreadSafe<CloudPrintURLFetcher>; | 113 friend class base::RefCountedThreadSafe<CloudPrintURLFetcher>; |
| 114 virtual ~CloudPrintURLFetcher(); | 114 virtual ~CloudPrintURLFetcher(); |
| 115 | 115 |
| 116 // Virtual for testing. | 116 // Virtual for testing. |
| 117 virtual net::URLRequestContextGetter* GetRequestContextGetter(); | 117 virtual net::URLRequestContextGetter* GetRequestContextGetter(); |
| 118 | 118 |
| 119 private: | 119 private: |
| 120 void StartRequestHelper(const GURL& url, | 120 void StartRequestHelper(const GURL& url, |
| 121 content::URLFetcher::RequestType request_type, | 121 net::URLFetcher::RequestType request_type, |
| 122 Delegate* delegate, | 122 Delegate* delegate, |
| 123 int max_retries, | 123 int max_retries, |
| 124 const std::string& post_data_mime_type, | 124 const std::string& post_data_mime_type, |
| 125 const std::string& post_data, | 125 const std::string& post_data, |
| 126 const std::string& additional_headers); | 126 const std::string& additional_headers); |
| 127 void SetupRequestHeaders(); | 127 void SetupRequestHeaders(); |
| 128 | 128 |
| 129 scoped_ptr<content::URLFetcher> request_; | 129 scoped_ptr<net::URLFetcher> request_; |
| 130 Delegate* delegate_; | 130 Delegate* delegate_; |
| 131 int num_retries_; | 131 int num_retries_; |
| 132 content::URLFetcher::RequestType request_type_; | 132 net::URLFetcher::RequestType request_type_; |
| 133 std::string additional_headers_; | 133 std::string additional_headers_; |
| 134 std::string post_data_mime_type_; | 134 std::string post_data_mime_type_; |
| 135 std::string post_data_; | 135 std::string post_data_; |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 typedef CloudPrintURLFetcher::Delegate CloudPrintURLFetcherDelegate; | 138 typedef CloudPrintURLFetcher::Delegate CloudPrintURLFetcherDelegate; |
| 139 | 139 |
| 140 #endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_URL_FETCHER_H_ | 140 #endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_URL_FETCHER_H_ |
| OLD | NEW |