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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 const std::string& additional_headers); | 127 const std::string& additional_headers); |
128 void StartPostRequest(RequestType type, | 128 void StartPostRequest(RequestType type, |
129 const GURL& url, | 129 const GURL& url, |
130 Delegate* delegate, | 130 Delegate* delegate, |
131 int max_retries, | 131 int max_retries, |
132 const std::string& post_data_mime_type, | 132 const std::string& post_data_mime_type, |
133 const std::string& post_data, | 133 const std::string& post_data, |
134 const std::string& additional_headers); | 134 const std::string& additional_headers); |
135 | 135 |
136 // net::URLFetcherDelegate implementation. | 136 // net::URLFetcherDelegate implementation. |
137 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; | 137 virtual void OnURLFetchComplete(const net::URLFetcher* source) override; |
138 | 138 |
139 protected: | 139 protected: |
140 CloudPrintURLFetcher(); | 140 CloudPrintURLFetcher(); |
141 friend class base::RefCountedThreadSafe<CloudPrintURLFetcher>; | 141 friend class base::RefCountedThreadSafe<CloudPrintURLFetcher>; |
142 virtual ~CloudPrintURLFetcher(); | 142 virtual ~CloudPrintURLFetcher(); |
143 | 143 |
144 // Virtual for testing. | 144 // Virtual for testing. |
145 virtual net::URLRequestContextGetter* GetRequestContextGetter(); | 145 virtual net::URLRequestContextGetter* GetRequestContextGetter(); |
146 | 146 |
147 private: | 147 private: |
(...skipping 18 matching lines...) Expand all Loading... |
166 | 166 |
167 RequestType type_; | 167 RequestType type_; |
168 base::Time start_time_; | 168 base::Time start_time_; |
169 }; | 169 }; |
170 | 170 |
171 typedef CloudPrintURLFetcher::Delegate CloudPrintURLFetcherDelegate; | 171 typedef CloudPrintURLFetcher::Delegate CloudPrintURLFetcherDelegate; |
172 | 172 |
173 } // namespace cloud_print | 173 } // namespace cloud_print |
174 | 174 |
175 #endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_URL_FETCHER_H_ | 175 #endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_URL_FETCHER_H_ |
OLD | NEW |