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

Side by Side Diff: net/base/network_delegate.h

Issue 2633663003: Implements strict secure cookies as the default behavior in //net (Closed)
Patch Set: Rebase on ToT Created 3 years, 10 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
« no previous file with comments | « net/base/layered_network_delegate.cc ('k') | net/base/network_delegate.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_BASE_NETWORK_DELEGATE_H_ 5 #ifndef NET_BASE_NETWORK_DELEGATE_H_
6 #define NET_BASE_NETWORK_DELEGATE_H_ 6 #define NET_BASE_NETWORK_DELEGATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 bool CanSetCookie(const URLRequest& request, 100 bool CanSetCookie(const URLRequest& request,
101 const std::string& cookie_line, 101 const std::string& cookie_line,
102 CookieOptions* options); 102 CookieOptions* options);
103 bool CanAccessFile(const URLRequest& request, 103 bool CanAccessFile(const URLRequest& request,
104 const base::FilePath& path) const; 104 const base::FilePath& path) const;
105 bool CanEnablePrivacyMode(const GURL& url, 105 bool CanEnablePrivacyMode(const GURL& url,
106 const GURL& first_party_for_cookies) const; 106 const GURL& first_party_for_cookies) const;
107 107
108 bool AreExperimentalCookieFeaturesEnabled() const; 108 bool AreExperimentalCookieFeaturesEnabled() const;
109 109
110 // TODO(jww): Remove this once we ship strict secure cookies:
111 // https://crbug.com/546820
112 bool AreStrictSecureCookiesEnabled() const;
113
114 bool CancelURLRequestWithPolicyViolatingReferrerHeader( 110 bool CancelURLRequestWithPolicyViolatingReferrerHeader(
115 const URLRequest& request, 111 const URLRequest& request,
116 const GURL& target_url, 112 const GURL& target_url,
117 const GURL& referrer_url) const; 113 const GURL& referrer_url) const;
118 114
119 private: 115 private:
120 // This is the interface for subclasses of NetworkDelegate to implement. These 116 // This is the interface for subclasses of NetworkDelegate to implement. These
121 // member functions will be called by the respective public notification 117 // member functions will be called by the respective public notification
122 // member function, which will perform basic sanity checking. 118 // member function, which will perform basic sanity checking.
123 // 119 //
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 // is not tracked by the server. Usually is false, unless user privacy 276 // is not tracked by the server. Usually is false, unless user privacy
281 // settings block cookies from being get or set. 277 // settings block cookies from being get or set.
282 virtual bool OnCanEnablePrivacyMode( 278 virtual bool OnCanEnablePrivacyMode(
283 const GURL& url, 279 const GURL& url,
284 const GURL& first_party_for_cookies) const = 0; 280 const GURL& first_party_for_cookies) const = 0;
285 281
286 // Returns true if the embedder has enabled the experimental features, and 282 // Returns true if the embedder has enabled the experimental features, and
287 // false otherwise. 283 // false otherwise.
288 virtual bool OnAreExperimentalCookieFeaturesEnabled() const = 0; 284 virtual bool OnAreExperimentalCookieFeaturesEnabled() const = 0;
289 285
290 // Returns true if the embedder has enabled experimental features or
291 // specifically strict secure cookies, and false otherwise.
292 //
293 // TODO(jww): Remove this once we ship strict secure cookies:
294 // https://crbug.com/546820.
295 virtual bool OnAreStrictSecureCookiesEnabled() const = 0;
296
297 // Called when the |referrer_url| for requesting |target_url| during handling 286 // Called when the |referrer_url| for requesting |target_url| during handling
298 // of the |request| is does not comply with the referrer policy (e.g. a 287 // of the |request| is does not comply with the referrer policy (e.g. a
299 // secure referrer for an insecure initial target). 288 // secure referrer for an insecure initial target).
300 // Returns true if the request should be cancelled. Otherwise, the referrer 289 // Returns true if the request should be cancelled. Otherwise, the referrer
301 // header is stripped from the request. 290 // header is stripped from the request.
302 virtual bool OnCancelURLRequestWithPolicyViolatingReferrerHeader( 291 virtual bool OnCancelURLRequestWithPolicyViolatingReferrerHeader(
303 const URLRequest& request, 292 const URLRequest& request,
304 const GURL& target_url, 293 const GURL& target_url,
305 const GURL& referrer_url) const = 0; 294 const GURL& referrer_url) const = 0;
306 }; 295 };
307 296
308 } // namespace net 297 } // namespace net
309 298
310 #endif // NET_BASE_NETWORK_DELEGATE_H_ 299 #endif // NET_BASE_NETWORK_DELEGATE_H_
OLDNEW
« no previous file with comments | « net/base/layered_network_delegate.cc ('k') | net/base/network_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698