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

Side by Side Diff: content/browser/webui/web_ui_url_loader_factory.cc

Issue 2976323002: Hook up ProfileIOData's URLRequestContext to a NetworkService. (Closed)
Patch Set: Response to comments 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
« no previous file with comments | « content/browser/url_loader_factory_getter.cc ('k') | content/network/DEPS » ('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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/webui/web_ui_url_loader_factory.h" 5 #include "content/browser/webui/web_ui_url_loader_factory.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 void CreateLoaderAndStart(mojom::URLLoaderAssociatedRequest loader, 227 void CreateLoaderAndStart(mojom::URLLoaderAssociatedRequest loader,
228 int32_t routing_id, 228 int32_t routing_id,
229 int32_t request_id, 229 int32_t request_id,
230 uint32_t options, 230 uint32_t options,
231 const ResourceRequest& request, 231 const ResourceRequest& request,
232 mojom::URLLoaderClientPtr client, 232 mojom::URLLoaderClientPtr client,
233 const net::MutableNetworkTrafficAnnotationTag& 233 const net::MutableNetworkTrafficAnnotationTag&
234 traffic_annotation) override { 234 traffic_annotation) override {
235 DCHECK_CURRENTLY_ON(BrowserThread::UI); 235 DCHECK_CURRENTLY_ON(BrowserThread::UI);
236 if (request.url.host_piece() == kChromeUINetworkViewCacheHost) { 236 if (request.url.host_piece() == kChromeUINetworkViewCacheHost) {
237 storage_partition_->network_context()->HandleViewCacheRequest( 237 storage_partition_->GetNetworkContext()->HandleViewCacheRequest(
238 request.url, std::move(client)); 238 request.url, std::move(client));
239 return; 239 return;
240 } 240 }
241 241
242 if (request.url.host_piece() == kChromeUIBlobInternalsHost) { 242 if (request.url.host_piece() == kChromeUIBlobInternalsHost) {
243 BrowserThread::PostTask( 243 BrowserThread::PostTask(
244 BrowserThread::IO, FROM_HERE, 244 BrowserThread::IO, FROM_HERE,
245 base::BindOnce(&StartBlobInternalsURLLoader, request, 245 base::BindOnce(&StartBlobInternalsURLLoader, request,
246 client.PassInterface(), 246 client.PassInterface(),
247 base::Unretained(ChromeBlobStorageContext::GetFor( 247 base::Unretained(ChromeBlobStorageContext::GetFor(
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 } // namespace 291 } // namespace
292 292
293 mojom::URLLoaderFactoryPtr CreateWebUIURLLoader(FrameTreeNode* node) { 293 mojom::URLLoaderFactoryPtr CreateWebUIURLLoader(FrameTreeNode* node) {
294 int ftn_id = node->frame_tree_node_id(); 294 int ftn_id = node->frame_tree_node_id();
295 if (g_factories.Get()[ftn_id].get() == nullptr) 295 if (g_factories.Get()[ftn_id].get() == nullptr)
296 g_factories.Get()[ftn_id] = base::MakeUnique<WebUIURLLoaderFactory>(node); 296 g_factories.Get()[ftn_id] = base::MakeUnique<WebUIURLLoaderFactory>(node);
297 return g_factories.Get()[ftn_id]->CreateBinding(); 297 return g_factories.Get()[ftn_id]->CreateBinding();
298 } 298 }
299 299
300 } // namespace content 300 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/url_loader_factory_getter.cc ('k') | content/network/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698