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

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: review comments 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 3091 matching lines...) Expand 10 before | Expand all | Expand 10 after
3102 const ResourceResponseHead head = response ? 3102 const ResourceResponseHead head = response ?
3103 response->head : ResourceResponseHead(); 3103 response->head : ResourceResponseHead();
3104 FrameMsg_CommitDataNetworkService_Params commit_data; 3104 FrameMsg_CommitDataNetworkService_Params commit_data;
3105 commit_data.handle = handle.release(); 3105 commit_data.handle = handle.release();
3106 // TODO(scottmg): Pass a factory for SW, etc. once we have one. 3106 // TODO(scottmg): Pass a factory for SW, etc. once we have one.
3107 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 3107 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
3108 switches::kEnableNetworkService)) { 3108 switches::kEnableNetworkService)) {
3109 const auto& schemes = URLDataManagerBackend::GetWebUISchemes(); 3109 const auto& schemes = URLDataManagerBackend::GetWebUISchemes();
3110 if (std::find(schemes.begin(), schemes.end(), common_params.url.scheme()) != 3110 if (std::find(schemes.begin(), schemes.end(), common_params.url.scheme()) !=
3111 schemes.end()) { 3111 schemes.end()) {
3112 commit_data.url_loader_factory = GetWebUIURLLoader(frame_tree_node_) 3112 commit_data.url_loader_factory = CreateWebUIURLLoader(frame_tree_node_)
3113 .PassInterface() 3113 .PassInterface()
3114 .PassHandle() 3114 .PassHandle()
3115 .release(); 3115 .release();
3116 } 3116 }
3117 } 3117 }
3118 Send(new FrameMsg_CommitNavigation(routing_id_, head, body_url, commit_data, 3118 Send(new FrameMsg_CommitNavigation(routing_id_, head, body_url, commit_data,
3119 common_params, request_params)); 3119 common_params, request_params));
3120 3120
3121 // If a network request was made, update the Previews state. 3121 // If a network request was made, update the Previews state.
3122 if (ShouldMakeNetworkRequestForURL(common_params.url) && 3122 if (ShouldMakeNetworkRequestForURL(common_params.url) &&
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
3983 } 3983 }
3984 3984
3985 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( 3985 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame(
3986 const std::string& interface_name, 3986 const std::string& interface_name,
3987 mojo::ScopedMessagePipeHandle pipe) { 3987 mojo::ScopedMessagePipeHandle pipe) {
3988 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); 3988 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe));
3989 } 3989 }
3990 #endif 3990 #endif
3991 3991
3992 } // namespace content 3992 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698