OLD | NEW |
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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 task_runner_->PostTask(FROM_HERE, | 449 task_runner_->PostTask(FROM_HERE, |
450 base::Bind(&Context::HandleDataURL, this)); | 450 base::Bind(&Context::HandleDataURL, this)); |
451 } | 451 } |
452 return; | 452 return; |
453 } | 453 } |
454 | 454 |
455 // PlzNavigate: outside of tests, the only navigation requests going through | 455 // PlzNavigate: outside of tests, the only navigation requests going through |
456 // the WebURLLoader are the ones created by CommitNavigation. Several browser | 456 // the WebURLLoader are the ones created by CommitNavigation. Several browser |
457 // tests load HTML directly through a data url which will be handled by the | 457 // tests load HTML directly through a data url which will be handled by the |
458 // block above. | 458 // block above. |
459 DCHECK_IMPLIES(base::CommandLine::ForCurrentProcess()->HasSwitch( | 459 DCHECK(!base::CommandLine::ForCurrentProcess()->HasSwitch( |
460 switches::kEnableBrowserSideNavigation), | 460 switches::kEnableBrowserSideNavigation) || |
461 stream_override_.get() || | 461 (stream_override_.get() || |
462 request.frameType() == WebURLRequest::FrameTypeNone); | 462 request.frameType() == WebURLRequest::FrameTypeNone)); |
463 | 463 |
464 GURL referrer_url( | 464 GURL referrer_url( |
465 request.httpHeaderField(WebString::fromUTF8("Referer")).latin1()); | 465 request.httpHeaderField(WebString::fromUTF8("Referer")).latin1()); |
466 const std::string& method = request.httpMethod().latin1(); | 466 const std::string& method = request.httpMethod().latin1(); |
467 | 467 |
468 // TODO(brettw) this should take parameter encoding into account when | 468 // TODO(brettw) this should take parameter encoding into account when |
469 // creating the GURLs. | 469 // creating the GURLs. |
470 | 470 |
471 // TODO(horo): Check credentials flag is unset when credentials mode is omit. | 471 // TODO(horo): Check credentials flag is unset when credentials mode is omit. |
472 // Check credentials flag is set when credentials mode is include. | 472 // Check credentials flag is set when credentials mode is include. |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1036 int intra_priority_value) { | 1036 int intra_priority_value) { |
1037 context_->DidChangePriority(new_priority, intra_priority_value); | 1037 context_->DidChangePriority(new_priority, intra_priority_value); |
1038 } | 1038 } |
1039 | 1039 |
1040 bool WebURLLoaderImpl::attachThreadedDataReceiver( | 1040 bool WebURLLoaderImpl::attachThreadedDataReceiver( |
1041 blink::WebThreadedDataReceiver* threaded_data_receiver) { | 1041 blink::WebThreadedDataReceiver* threaded_data_receiver) { |
1042 return context_->AttachThreadedDataReceiver(threaded_data_receiver); | 1042 return context_->AttachThreadedDataReceiver(threaded_data_receiver); |
1043 } | 1043 } |
1044 | 1044 |
1045 } // namespace content | 1045 } // namespace content |
OLD | NEW |