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

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

Issue 1868763002: Remove URLRequest::IsHandledProtocol and IsHandledURL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: finish removing URLRequest::IsHandledProtocol() Created 4 years, 8 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
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 #include "net/url_request/url_request.h" 5 #include "net/url_request/url_request.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 if ((load_flags_ & LOAD_IGNORE_LIMITS) != 0) 422 if ((load_flags_ & LOAD_IGNORE_LIMITS) != 0)
423 SetPriority(MAXIMUM_PRIORITY); 423 SetPriority(MAXIMUM_PRIORITY);
424 } 424 }
425 425
426 // static 426 // static
427 void URLRequest::SetDefaultCookiePolicyToBlock() { 427 void URLRequest::SetDefaultCookiePolicyToBlock() {
428 CHECK(!g_url_requests_started); 428 CHECK(!g_url_requests_started);
429 g_default_can_use_cookies = false; 429 g_default_can_use_cookies = false;
430 } 430 }
431 431
432 // static
433 bool URLRequest::IsHandledProtocol(const std::string& scheme) {
434 return URLRequestJobManager::SupportsScheme(scheme);
435 }
436
437 // static
438 bool URLRequest::IsHandledURL(const GURL& url) {
439 if (!url.is_valid()) {
440 // We handle error cases.
441 return true;
442 }
443
444 return IsHandledProtocol(url.scheme());
445 }
446
447 void URLRequest::set_first_party_for_cookies( 432 void URLRequest::set_first_party_for_cookies(
448 const GURL& first_party_for_cookies) { 433 const GURL& first_party_for_cookies) {
449 DCHECK(!is_pending_); 434 DCHECK(!is_pending_);
450 first_party_for_cookies_ = first_party_for_cookies; 435 first_party_for_cookies_ = first_party_for_cookies;
451 } 436 }
452 437
453 void URLRequest::set_first_party_url_policy( 438 void URLRequest::set_first_party_url_policy(
454 FirstPartyURLPolicy first_party_url_policy) { 439 FirstPartyURLPolicy first_party_url_policy) {
455 DCHECK(!is_pending_); 440 DCHECK(!is_pending_);
456 first_party_url_policy_ = first_party_url_policy; 441 first_party_url_policy_ = first_party_url_policy;
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
1200 } 1185 }
1201 1186
1202 void URLRequest::GetConnectionAttempts(ConnectionAttempts* out) const { 1187 void URLRequest::GetConnectionAttempts(ConnectionAttempts* out) const {
1203 if (job_) 1188 if (job_)
1204 job_->GetConnectionAttempts(out); 1189 job_->GetConnectionAttempts(out);
1205 else 1190 else
1206 out->clear(); 1191 out->clear();
1207 } 1192 }
1208 1193
1209 } // namespace net 1194 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698