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

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

Issue 1868763002: Remove URLRequest::IsHandledProtocol and IsHandledURL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase (needs fixing) Created 4 years, 2 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 | « ios/chrome/browser/chrome_url_util.mm ('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 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 ~URLRequest() override; 229 ~URLRequest() override;
230 230
231 // Changes the default cookie policy from allowing all cookies to blocking all 231 // Changes the default cookie policy from allowing all cookies to blocking all
232 // cookies. Embedders that want to implement a more flexible policy should 232 // cookies. Embedders that want to implement a more flexible policy should
233 // change the default to blocking all cookies, and provide a NetworkDelegate 233 // change the default to blocking all cookies, and provide a NetworkDelegate
234 // with the URLRequestContext that maintains the CookieStore. 234 // with the URLRequestContext that maintains the CookieStore.
235 // The cookie policy default has to be set before the first URLRequest is 235 // The cookie policy default has to be set before the first URLRequest is
236 // started. Once it was set to block all cookies, it cannot be changed back. 236 // started. Once it was set to block all cookies, it cannot be changed back.
237 static void SetDefaultCookiePolicyToBlock(); 237 static void SetDefaultCookiePolicyToBlock();
238 238
239 // Returns true if the scheme can be handled by URLRequest. False otherwise.
240 static bool IsHandledProtocol(const std::string& scheme);
241
242 // Returns true if the url can be handled by URLRequest. False otherwise.
243 // The function returns true for invalid urls because URLRequest knows how
244 // to handle those.
245 // NOTE: This will also return true for URLs that are handled by
246 // ProtocolFactories that only work for requests that are scoped to a
247 // Profile.
248 static bool IsHandledURL(const GURL& url);
249
250 // The original url is the url used to initialize the request, and it may 239 // The original url is the url used to initialize the request, and it may
251 // differ from the url if the request was redirected. 240 // differ from the url if the request was redirected.
252 const GURL& original_url() const { return url_chain_.front(); } 241 const GURL& original_url() const { return url_chain_.front(); }
253 // The chain of urls traversed by this request. If the request had no 242 // The chain of urls traversed by this request. If the request had no
254 // redirects, this vector will contain one element. 243 // redirects, this vector will contain one element.
255 const std::vector<GURL>& url_chain() const { return url_chain_; } 244 const std::vector<GURL>& url_chain() const { return url_chain_; }
256 const GURL& url() const { return url_chain_.back(); } 245 const GURL& url() const { return url_chain_.back(); }
257 246
258 // The URL that should be consulted for the third-party cookie blocking 247 // The URL that should be consulted for the third-party cookie blocking
259 // policy, as defined in Section 2.1.1 and 2.1.2 of 248 // policy, as defined in Section 2.1.1 and 2.1.2 of
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 845
857 // The raw header size of the response. 846 // The raw header size of the response.
858 int raw_header_size_; 847 int raw_header_size_;
859 848
860 DISALLOW_COPY_AND_ASSIGN(URLRequest); 849 DISALLOW_COPY_AND_ASSIGN(URLRequest);
861 }; 850 };
862 851
863 } // namespace net 852 } // namespace net
864 853
865 #endif // NET_URL_REQUEST_URL_REQUEST_H_ 854 #endif // NET_URL_REQUEST_URL_REQUEST_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/chrome_url_util.mm ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698