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

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

Issue 2960703003: Add a feature flag for network service and about:flags entry for it. (Closed)
Patch Set: more updates Created 3 years, 5 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 3179 matching lines...) Expand 10 before | Expand all | Expand 10 after
3190 DCHECK(!GetParent()); 3190 DCHECK(!GetParent());
3191 render_view_host()->Send(new FrameMsg_EnableViewSourceMode(routing_id_)); 3191 render_view_host()->Send(new FrameMsg_EnableViewSourceMode(routing_id_));
3192 } 3192 }
3193 3193
3194 const GURL body_url = body.get() ? body->GetURL() : GURL(); 3194 const GURL body_url = body.get() ? body->GetURL() : GURL();
3195 const ResourceResponseHead head = response ? 3195 const ResourceResponseHead head = response ?
3196 response->head : ResourceResponseHead(); 3196 response->head : ResourceResponseHead();
3197 FrameMsg_CommitDataNetworkService_Params commit_data; 3197 FrameMsg_CommitDataNetworkService_Params commit_data;
3198 commit_data.handle = handle.release(); 3198 commit_data.handle = handle.release();
3199 // TODO(scottmg): Pass a factory for SW, etc. once we have one. 3199 // TODO(scottmg): Pass a factory for SW, etc. once we have one.
3200 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 3200 if (base::FeatureList::IsEnabled(features::kNetworkService)) {
3201 switches::kEnableNetworkService)) {
3202 if (!subresource_url_loader_factory_info.is_valid()) { 3201 if (!subresource_url_loader_factory_info.is_valid()) {
3203 const auto& schemes = URLDataManagerBackend::GetWebUISchemes(); 3202 const auto& schemes = URLDataManagerBackend::GetWebUISchemes();
3204 if (std::find(schemes.begin(), schemes.end(), 3203 if (std::find(schemes.begin(), schemes.end(),
3205 common_params.url.scheme()) != schemes.end()) { 3204 common_params.url.scheme()) != schemes.end()) {
3206 commit_data.url_loader_factory = CreateWebUIURLLoader(frame_tree_node_) 3205 commit_data.url_loader_factory = CreateWebUIURLLoader(frame_tree_node_)
3207 .PassInterface() 3206 .PassInterface()
3208 .PassHandle() 3207 .PassHandle()
3209 .release(); 3208 .release();
3210 } 3209 }
3211 } else { 3210 } else {
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
4145 } 4144 }
4146 4145
4147 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( 4146 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame(
4148 const std::string& interface_name, 4147 const std::string& interface_name,
4149 mojo::ScopedMessagePipeHandle pipe) { 4148 mojo::ScopedMessagePipeHandle pipe) {
4150 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); 4149 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe));
4151 } 4150 }
4152 #endif 4151 #endif
4153 4152
4154 } // namespace content 4153 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698