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_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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
102 const CookieList& cookie_list); | 102 const CookieList& cookie_list); |
103 bool CanSetCookie(const URLRequest& request, | 103 bool CanSetCookie(const URLRequest& request, |
104 const std::string& cookie_line, | 104 const std::string& cookie_line, |
105 CookieOptions* options); | 105 CookieOptions* options); |
106 bool CanAccessFile(const URLRequest& request, | 106 bool CanAccessFile(const URLRequest& request, |
107 const base::FilePath& path) const; | 107 const base::FilePath& path) const; |
108 bool CanEnablePrivacyMode(const GURL& url, | 108 bool CanEnablePrivacyMode(const GURL& url, |
109 const GURL& first_party_for_cookies) const; | 109 const GURL& first_party_for_cookies) const; |
110 | 110 |
111 // TODO(mkwst): Remove this once we decide whether or not we wish to ship | 111 // TODO(mkwst): Remove this once we decide whether or not we wish to ship |
112 // first-party cookies. https://crbug.com/459154 | 112 // first-party cookies and cookie prefixes. https://crbug.com/459154, |
113 bool FirstPartyOnlyCookieExperimentEnabled() const; | 113 // https://crbug.com/541511 |
114 bool ExperimentalFeaturesEnabled() const; | |
estark
2015/10/09 13:51:57
Maybe this should be ExperimentalCookieFeaturesEna
Mike West
2015/10/09 15:41:33
Probably better, yes. I'd also suggest splitting t
estark
2015/10/10 05:04:02
Done, and split out the rename into https://codere
| |
114 | 115 |
115 bool CancelURLRequestWithPolicyViolatingReferrerHeader( | 116 bool CancelURLRequestWithPolicyViolatingReferrerHeader( |
116 const URLRequest& request, | 117 const URLRequest& request, |
117 const GURL& target_url, | 118 const GURL& target_url, |
118 const GURL& referrer_url) const; | 119 const GURL& referrer_url) const; |
119 | 120 |
120 private: | 121 private: |
121 // This is the interface for subclasses of NetworkDelegate to implement. These | 122 // This is the interface for subclasses of NetworkDelegate to implement. These |
122 // member functions will be called by the respective public notification | 123 // member functions will be called by the respective public notification |
123 // member function, which will perform basic sanity checking. | 124 // member function, which will perform basic sanity checking. |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
287 virtual bool OnCanAccessFile(const URLRequest& request, | 288 virtual bool OnCanAccessFile(const URLRequest& request, |
288 const base::FilePath& path) const = 0; | 289 const base::FilePath& path) const = 0; |
289 | 290 |
290 // Returns true if the given |url| has to be requested over connection that | 291 // Returns true if the given |url| has to be requested over connection that |
291 // is not tracked by the server. Usually is false, unless user privacy | 292 // is not tracked by the server. Usually is false, unless user privacy |
292 // settings block cookies from being get or set. | 293 // settings block cookies from being get or set. |
293 virtual bool OnCanEnablePrivacyMode( | 294 virtual bool OnCanEnablePrivacyMode( |
294 const GURL& url, | 295 const GURL& url, |
295 const GURL& first_party_for_cookies) const = 0; | 296 const GURL& first_party_for_cookies) const = 0; |
296 | 297 |
297 // Returns true if the embedder has enabled the "first-party" cookie | 298 // Returns true if the embedder has enabled the experimental features, |
298 // experiment, and false otherwise. | 299 // and false otherwise. |
299 // | 300 // |
300 // TODO(mkwst): Remove this once we decide whether or not we wish to ship | 301 // TODO(mkwst): Remove this once we decide whether or not we wish to ship |
301 // first-party cookies. https://crbug.com/459154 | 302 // first-party cookies and cookie prefixes. https://crbug.com/459154, |
302 virtual bool OnFirstPartyOnlyCookieExperimentEnabled() const = 0; | 303 // https://crbug.com/541511 |
304 virtual bool OnExperimentalFeaturesEnabled() const = 0; | |
303 | 305 |
304 // Called when the |referrer_url| for requesting |target_url| during handling | 306 // Called when the |referrer_url| for requesting |target_url| during handling |
305 // of the |request| is does not comply with the referrer policy (e.g. a | 307 // of the |request| is does not comply with the referrer policy (e.g. a |
306 // secure referrer for an insecure initial target). | 308 // secure referrer for an insecure initial target). |
307 // Returns true if the request should be cancelled. Otherwise, the referrer | 309 // Returns true if the request should be cancelled. Otherwise, the referrer |
308 // header is stripped from the request. | 310 // header is stripped from the request. |
309 virtual bool OnCancelURLRequestWithPolicyViolatingReferrerHeader( | 311 virtual bool OnCancelURLRequestWithPolicyViolatingReferrerHeader( |
310 const URLRequest& request, | 312 const URLRequest& request, |
311 const GURL& target_url, | 313 const GURL& target_url, |
312 const GURL& referrer_url) const = 0; | 314 const GURL& referrer_url) const = 0; |
313 }; | 315 }; |
314 | 316 |
315 } // namespace net | 317 } // namespace net |
316 | 318 |
317 #endif // NET_BASE_NETWORK_DELEGATE_H_ | 319 #endif // NET_BASE_NETWORK_DELEGATE_H_ |
OLD | NEW |