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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2906543002: Add support for reading blobs when using the network service. (Closed)
Patch Set: fix threading issue with weakptr Created 3 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 3133 matching lines...) Expand 10 before | Expand all | Expand 10 after
3144 const ResourceResponseHead head = response ? 3144 const ResourceResponseHead head = response ?
3145 response->head : ResourceResponseHead(); 3145 response->head : ResourceResponseHead();
3146 FrameMsg_CommitDataNetworkService_Params commit_data; 3146 FrameMsg_CommitDataNetworkService_Params commit_data;
3147 commit_data.handle = handle.release(); 3147 commit_data.handle = handle.release();
3148 // TODO(scottmg): Pass a factory for SW, etc. once we have one. 3148 // TODO(scottmg): Pass a factory for SW, etc. once we have one.
3149 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 3149 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
3150 switches::kEnableNetworkService)) { 3150 switches::kEnableNetworkService)) {
3151 const auto& schemes = URLDataManagerBackend::GetWebUISchemes(); 3151 const auto& schemes = URLDataManagerBackend::GetWebUISchemes();
3152 if (std::find(schemes.begin(), schemes.end(), common_params.url.scheme()) != 3152 if (std::find(schemes.begin(), schemes.end(), common_params.url.scheme()) !=
3153 schemes.end()) { 3153 schemes.end()) {
3154 commit_data.url_loader_factory = GetWebUIURLLoader(frame_tree_node_) 3154 commit_data.url_loader_factory = CreateWebUIURLLoader(frame_tree_node_)
3155 .PassInterface() 3155 .PassInterface()
3156 .PassHandle() 3156 .PassHandle()
3157 .release(); 3157 .release();
3158 } 3158 }
3159 } 3159 }
3160 Send(new FrameMsg_CommitNavigation(routing_id_, head, body_url, commit_data, 3160 Send(new FrameMsg_CommitNavigation(routing_id_, head, body_url, commit_data,
3161 common_params, request_params)); 3161 common_params, request_params));
3162 3162
3163 // If a network request was made, update the Previews state. 3163 // If a network request was made, update the Previews state.
3164 if (ShouldMakeNetworkRequestForURL(common_params.url) && 3164 if (ShouldMakeNetworkRequestForURL(common_params.url) &&
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
4066 } 4066 }
4067 4067
4068 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( 4068 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame(
4069 const std::string& interface_name, 4069 const std::string& interface_name,
4070 mojo::ScopedMessagePipeHandle pipe) { 4070 mojo::ScopedMessagePipeHandle pipe) {
4071 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); 4071 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe));
4072 } 4072 }
4073 #endif 4073 #endif
4074 4074
4075 } // namespace content 4075 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/blob_storage/blob_url_unittest.cc ('k') | content/browser/loader/navigation_url_loader_network_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698