| 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 NET_URL_REQUEST_URL_FETCHER_H_ | 5 #ifndef NET_URL_REQUEST_URL_FETCHER_H_ |
| 6 #define NET_URL_REQUEST_URL_FETCHER_H_ | 6 #define NET_URL_REQUEST_URL_FETCHER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 POST, | 87 POST, |
| 88 HEAD, | 88 HEAD, |
| 89 DELETE_REQUEST, // DELETE is already taken on Windows. | 89 DELETE_REQUEST, // DELETE is already taken on Windows. |
| 90 // <winnt.h> defines a DELETE macro. | 90 // <winnt.h> defines a DELETE macro. |
| 91 PUT, | 91 PUT, |
| 92 PATCH, | 92 PATCH, |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 // Used by SetURLRequestUserData. The callback should make a fresh | 95 // Used by SetURLRequestUserData. The callback should make a fresh |
| 96 // base::SupportsUserData::Data object every time it's called. | 96 // base::SupportsUserData::Data object every time it's called. |
| 97 typedef base::Callback<base::SupportsUserData::Data*()> CreateDataCallback; | 97 typedef base::Callback<std::unique_ptr<base::SupportsUserData::Data>()> |
| 98 CreateDataCallback; |
| 98 | 99 |
| 99 // Used by SetUploadStreamFactory. The callback should assign a fresh upload | 100 // Used by SetUploadStreamFactory. The callback should assign a fresh upload |
| 100 // data stream every time it's called. | 101 // data stream every time it's called. |
| 101 typedef base::Callback<std::unique_ptr<UploadDataStream>()> | 102 typedef base::Callback<std::unique_ptr<UploadDataStream>()> |
| 102 CreateUploadStreamCallback; | 103 CreateUploadStreamCallback; |
| 103 | 104 |
| 104 virtual ~URLFetcher(); | 105 virtual ~URLFetcher(); |
| 105 | 106 |
| 106 // |url| is the URL to send the request to. It must be valid. | 107 // |url| is the URL to send the request to. It must be valid. |
| 107 // |request_type| is the type of request to make. | 108 // |request_type| is the type of request to make. |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 // be removed once the URLFetcher is destroyed. User should not take | 362 // be removed once the URLFetcher is destroyed. User should not take |
| 362 // ownership more than once, or call this method after taking ownership. | 363 // ownership more than once, or call this method after taking ownership. |
| 363 virtual bool GetResponseAsFilePath( | 364 virtual bool GetResponseAsFilePath( |
| 364 bool take_ownership, | 365 bool take_ownership, |
| 365 base::FilePath* out_response_path) const = 0; | 366 base::FilePath* out_response_path) const = 0; |
| 366 }; | 367 }; |
| 367 | 368 |
| 368 } // namespace net | 369 } // namespace net |
| 369 | 370 |
| 370 #endif // NET_URL_REQUEST_URL_FETCHER_H_ | 371 #endif // NET_URL_REQUEST_URL_FETCHER_H_ |
| OLD | NEW |