OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 int max_retries, | 100 int max_retries, |
101 const std::string& additional_headers); | 101 const std::string& additional_headers); |
102 void StartPostRequest(const GURL& url, | 102 void StartPostRequest(const GURL& url, |
103 Delegate* delegate, | 103 Delegate* delegate, |
104 int max_retries, | 104 int max_retries, |
105 const std::string& post_data_mime_type, | 105 const std::string& post_data_mime_type, |
106 const std::string& post_data, | 106 const std::string& post_data, |
107 const std::string& additional_headers); | 107 const std::string& additional_headers); |
108 | 108 |
109 // content::URLFetcherDelegate implementation. | 109 // content::URLFetcherDelegate implementation. |
110 virtual void OnURLFetchComplete(const content::URLFetcher* source); | 110 virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; |
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, |
(...skipping 10 matching lines...) Expand all Loading... |
131 int num_retries_; | 131 int num_retries_; |
132 content::URLFetcher::RequestType request_type_; | 132 content::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 |