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_REQUEST_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_H_ |
6 #define NET_URL_REQUEST_URL_REQUEST_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 // and bytes read will be -1. | 271 // and bytes read will be -1. |
272 virtual void OnReadCompleted(URLRequest* request, int bytes_read) = 0; | 272 virtual void OnReadCompleted(URLRequest* request, int bytes_read) = 0; |
273 | 273 |
274 protected: | 274 protected: |
275 virtual ~Delegate() {} | 275 virtual ~Delegate() {} |
276 }; | 276 }; |
277 | 277 |
278 // If destroyed after Start() has been called but while IO is pending, | 278 // If destroyed after Start() has been called but while IO is pending, |
279 // then the request will be effectively canceled and the delegate | 279 // then the request will be effectively canceled and the delegate |
280 // will not have any more of its methods called. | 280 // will not have any more of its methods called. |
281 virtual ~URLRequest(); | 281 ~URLRequest() override; |
282 | 282 |
283 // Changes the default cookie policy from allowing all cookies to blocking all | 283 // Changes the default cookie policy from allowing all cookies to blocking all |
284 // cookies. Embedders that want to implement a more flexible policy should | 284 // cookies. Embedders that want to implement a more flexible policy should |
285 // change the default to blocking all cookies, and provide a NetworkDelegate | 285 // change the default to blocking all cookies, and provide a NetworkDelegate |
286 // with the URLRequestContext that maintains the CookieStore. | 286 // with the URLRequestContext that maintains the CookieStore. |
287 // The cookie policy default has to be set before the first URLRequest is | 287 // The cookie policy default has to be set before the first URLRequest is |
288 // started. Once it was set to block all cookies, it cannot be changed back. | 288 // started. Once it was set to block all cookies, it cannot be changed back. |
289 static void SetDefaultCookiePolicyToBlock(); | 289 static void SetDefaultCookiePolicyToBlock(); |
290 | 290 |
291 // Returns true if the scheme can be handled by URLRequest. False otherwise. | 291 // Returns true if the scheme can be handled by URLRequest. False otherwise. |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
896 | 896 |
897 // The proxy server used for this request, if any. | 897 // The proxy server used for this request, if any. |
898 HostPortPair proxy_server_; | 898 HostPortPair proxy_server_; |
899 | 899 |
900 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 900 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
901 }; | 901 }; |
902 | 902 |
903 } // namespace net | 903 } // namespace net |
904 | 904 |
905 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 905 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
OLD | NEW |