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 | 100 |
101 protected: | 101 protected: |
102 friend class base::RefCountedThreadSafe<CloudPrintURLFetcher>; | 102 friend class base::RefCountedThreadSafe<CloudPrintURLFetcher>; |
103 virtual ~CloudPrintURLFetcher(); | 103 virtual ~CloudPrintURLFetcher(); |
104 | 104 |
105 // Virtual for testing. | 105 // Virtual for testing. |
106 virtual net::URLRequestContextGetter* GetRequestContextGetter(); | 106 virtual net::URLRequestContextGetter* GetRequestContextGetter(); |
107 | 107 |
108 private: | 108 private: |
109 void StartRequestHelper(const GURL& url, | 109 void StartRequestHelper(const GURL& url, |
110 URLFetcher::RequestType request_type, | 110 content::URLFetcher::RequestType request_type, |
111 Delegate* delegate, | 111 Delegate* delegate, |
112 int max_retries, | 112 int max_retries, |
113 const std::string& post_data_mime_type, | 113 const std::string& post_data_mime_type, |
114 const std::string& post_data, | 114 const std::string& post_data, |
115 const std::string& additional_headers); | 115 const std::string& additional_headers); |
116 void SetupRequestHeaders(); | 116 void SetupRequestHeaders(); |
117 | 117 |
118 scoped_ptr<content::URLFetcher> request_; | 118 scoped_ptr<content::URLFetcher> request_; |
119 Delegate* delegate_; | 119 Delegate* delegate_; |
120 int num_retries_; | 120 int num_retries_; |
121 URLFetcher::RequestType request_type_; | 121 content::URLFetcher::RequestType request_type_; |
122 std::string additional_headers_; | 122 std::string additional_headers_; |
123 std::string post_data_mime_type_; | 123 std::string post_data_mime_type_; |
124 std::string post_data_; | 124 std::string post_data_; |
125 }; | 125 }; |
126 | 126 |
127 typedef CloudPrintURLFetcher::Delegate CloudPrintURLFetcherDelegate; | 127 typedef CloudPrintURLFetcher::Delegate CloudPrintURLFetcherDelegate; |
128 | 128 |
129 #endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_URL_FETCHER_H_ | 129 #endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_URL_FETCHER_H_ |
OLD | NEW |