Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(357)

Side by Side Diff: net/url_request/url_request.h

Issue 10178009: Reland 130578 - Enable cookies per default in net. Add an API to disable them by default, and do th… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/service/service_main.cc ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 blocking all
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 block 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
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_
OLDNEW
« no previous file with comments | « chrome/service/service_main.cc ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698