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

Side by Side Diff: content/child/web_url_loader_impl.cc

Issue 1417903005: Revert of Remove DCHECK_IMPLIES/CHECK_IMPLIES. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/child/web_url_loader_impl.h" 5 #include "content/child/web_url_loader_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 ::blink::WebTraceLocation(__FUNCTION__, __FILE__), 443 ::blink::WebTraceLocation(__FUNCTION__, __FILE__),
444 new HandleDataURLTask(this)); 444 new HandleDataURLTask(this));
445 } 445 }
446 return; 446 return;
447 } 447 }
448 448
449 // PlzNavigate: outside of tests, the only navigation requests going through 449 // PlzNavigate: outside of tests, the only navigation requests going through
450 // the WebURLLoader are the ones created by CommitNavigation. Several browser 450 // the WebURLLoader are the ones created by CommitNavigation. Several browser
451 // tests load HTML directly through a data url which will be handled by the 451 // tests load HTML directly through a data url which will be handled by the
452 // block above. 452 // block above.
453 DCHECK(!base::CommandLine::ForCurrentProcess()->HasSwitch( 453 DCHECK_IMPLIES(base::CommandLine::ForCurrentProcess()->HasSwitch(
454 switches::kEnableBrowserSideNavigation) || 454 switches::kEnableBrowserSideNavigation),
455 stream_override_.get() || 455 stream_override_.get() ||
456 request.frameType() == WebURLRequest::FrameTypeNone); 456 request.frameType() == WebURLRequest::FrameTypeNone);
457 457
458 GURL referrer_url( 458 GURL referrer_url(
459 request.httpHeaderField(WebString::fromUTF8("Referer")).latin1()); 459 request.httpHeaderField(WebString::fromUTF8("Referer")).latin1());
460 const std::string& method = request.httpMethod().latin1(); 460 const std::string& method = request.httpMethod().latin1();
461 461
462 // TODO(brettw) this should take parameter encoding into account when 462 // TODO(brettw) this should take parameter encoding into account when
463 // creating the GURLs. 463 // creating the GURLs.
464 464
465 // TODO(horo): Check credentials flag is unset when credentials mode is omit. 465 // TODO(horo): Check credentials flag is unset when credentials mode is omit.
466 // Check credentials flag is set when credentials mode is include. 466 // Check credentials flag is set when credentials mode is include.
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 } 1091 }
1092 1092
1093 void WebURLLoaderImpl::setLoadingTaskRunner( 1093 void WebURLLoaderImpl::setLoadingTaskRunner(
1094 blink::WebTaskRunner* loading_task_runner) { 1094 blink::WebTaskRunner* loading_task_runner) {
1095 // There's no guarantee on the lifetime of |loading_task_runner| so we take a 1095 // There's no guarantee on the lifetime of |loading_task_runner| so we take a
1096 // copy. 1096 // copy.
1097 context_->SetWebTaskRunner(make_scoped_ptr(loading_task_runner->clone())); 1097 context_->SetWebTaskRunner(make_scoped_ptr(loading_task_runner->clone()));
1098 } 1098 }
1099 1099
1100 } // namespace content 1100 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/compositor_impl_android.cc ('k') | content/common/discardable_shared_memory_heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698