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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
284 }; | 284 }; |
285 | 285 |
286 // Initialize an URL request. | 286 // Initialize an URL request. |
287 URLRequest(const GURL& url, Delegate* delegate); | 287 URLRequest(const GURL& url, Delegate* delegate); |
288 | 288 |
289 // If destroyed after Start() has been called but while IO is pending, | 289 // If destroyed after Start() has been called but while IO is pending, |
290 // then the request will be effectively canceled and the delegate | 290 // then the request will be effectively canceled and the delegate |
291 // will not have any more of its methods called. | 291 // will not have any more of its methods called. |
292 virtual ~URLRequest(); | 292 virtual ~URLRequest(); |
293 | 293 |
294 // Changes the default cookie policy from allowing all cookies to denying all | |
wtc
2012/03/28 17:51:05
Nit: denying => blocking ?
which is a little more
jochen (gone - plz use gerrit)
2012/03/29 18:33:24
Done.
| |
295 // cookies. Embedders that want to implement a more flexible policy should | |
296 // change the default to blocking all cookies, and provide a NetworkDelegate | |
297 // with the URLRequestContext that maintains the CookieStore. | |
298 // The cookie policy default has to be set before the first URLRequest is | |
299 // started. Once it was set to deny all cookies, it cannot be changed back. | |
300 static void SetDefaultCookiePolicyToBlock(); | |
301 | |
294 // Returns true if the scheme can be handled by URLRequest. False otherwise. | 302 // Returns true if the scheme can be handled by URLRequest. False otherwise. |
295 static bool IsHandledProtocol(const std::string& scheme); | 303 static bool IsHandledProtocol(const std::string& scheme); |
296 | 304 |
297 // Returns true if the url can be handled by URLRequest. False otherwise. | 305 // Returns true if the url can be handled by URLRequest. False otherwise. |
298 // The function returns true for invalid urls because URLRequest knows how | 306 // The function returns true for invalid urls because URLRequest knows how |
299 // to handle those. | 307 // to handle those. |
300 // NOTE: This will also return true for URLs that are handled by | 308 // NOTE: This will also return true for URLs that are handled by |
301 // ProtocolFactories that only work for requests that are scoped to a | 309 // ProtocolFactories that only work for requests that are scoped to a |
302 // Profile. | 310 // Profile. |
303 static bool IsHandledURL(const GURL& url); | 311 static bool IsHandledURL(const GURL& url); |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
758 scoped_refptr<AuthChallengeInfo> auth_info_; | 766 scoped_refptr<AuthChallengeInfo> auth_info_; |
759 | 767 |
760 base::TimeTicks creation_time_; | 768 base::TimeTicks creation_time_; |
761 | 769 |
762 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 770 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
763 }; | 771 }; |
764 | 772 |
765 } // namespace net | 773 } // namespace net |
766 | 774 |
767 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 775 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
OLD | NEW |