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

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

Issue 2831513002: [DO NOT COMMIT] routing ID + CHECK
Patch Set: fix Created 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/FrameFetchContext.cpp » ('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 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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 const RequestExtraData empty_extra_data; 627 const RequestExtraData empty_extra_data;
628 const RequestExtraData* extra_data; 628 const RequestExtraData* extra_data;
629 if (request.GetExtraData()) 629 if (request.GetExtraData())
630 extra_data = static_cast<RequestExtraData*>(request.GetExtraData()); 630 extra_data = static_cast<RequestExtraData*>(request.GetExtraData());
631 else 631 else
632 extra_data = &empty_extra_data; 632 extra_data = &empty_extra_data;
633 extra_data->CopyToResourceRequest(resource_request.get()); 633 extra_data->CopyToResourceRequest(resource_request.get());
634 634
635 if (sync_load_response) { 635 if (sync_load_response) {
636 DCHECK(defers_loading_ == NOT_DEFERRING); 636 DCHECK(defers_loading_ == NOT_DEFERRING);
637 CHECK(request.RequestorID());
637 resource_dispatcher_->StartSync( 638 resource_dispatcher_->StartSync(
638 std::move(resource_request), request.RequestorID(), sync_load_response, 639 std::move(resource_request), request.RequestorID(), sync_load_response,
639 request.GetLoadingIPCType(), url_loader_factory_); 640 request.GetLoadingIPCType(), url_loader_factory_);
640 return; 641 return;
641 } 642 }
642 643
643 TRACE_EVENT_WITH_FLOW0("loading", "WebURLLoaderImpl::Context::Start", this, 644 TRACE_EVENT_WITH_FLOW0("loading", "WebURLLoaderImpl::Context::Start", this,
644 TRACE_EVENT_FLAG_FLOW_OUT); 645 TRACE_EVENT_FLAG_FLOW_OUT);
646 CHECK(request.RequestorID());
645 request_id_ = resource_dispatcher_->StartAsync( 647 request_id_ = resource_dispatcher_->StartAsync(
646 std::move(resource_request), request.RequestorID(), task_runner_, 648 std::move(resource_request), request.RequestorID(), task_runner_,
647 extra_data->frame_origin(), 649 extra_data->frame_origin(),
648 base::MakeUnique<WebURLLoaderImpl::RequestPeerImpl>(this), 650 base::MakeUnique<WebURLLoaderImpl::RequestPeerImpl>(this),
649 request.GetLoadingIPCType(), url_loader_factory_, 651 request.GetLoadingIPCType(), url_loader_factory_,
650 std::move(consumer_handle)); 652 std::move(consumer_handle));
651 653
652 if (defers_loading_ != NOT_DEFERRING) 654 if (defers_loading_ != NOT_DEFERRING)
653 resource_dispatcher_->SetDefersLoading(request_id_, true); 655 resource_dispatcher_->SetDefersLoading(request_id_, true);
654 } 656 }
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
1276 int intra_priority_value) { 1278 int intra_priority_value) {
1277 context_->DidChangePriority(new_priority, intra_priority_value); 1279 context_->DidChangePriority(new_priority, intra_priority_value);
1278 } 1280 }
1279 1281
1280 void WebURLLoaderImpl::SetLoadingTaskRunner( 1282 void WebURLLoaderImpl::SetLoadingTaskRunner(
1281 base::SingleThreadTaskRunner* loading_task_runner) { 1283 base::SingleThreadTaskRunner* loading_task_runner) {
1282 context_->SetTaskRunner(loading_task_runner); 1284 context_->SetTaskRunner(loading_task_runner);
1283 } 1285 }
1284 1286
1285 } // namespace content 1287 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/FrameFetchContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698