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

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

Issue 2867083002: Move the new WebUI's code to read the data off the IO thread as it's generally from the memory-mapp… (Closed)
Patch Set: review comments and a TODO Created 3 years, 7 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 | content/browser/webui/web_ui_url_loader_factory.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/url_data_manager_backend.h" 5 #include "content/browser/webui/url_data_manager_backend.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 for (PendingRequestMap::const_iterator i = pending_requests_.begin(); 503 for (PendingRequestMap::const_iterator i = pending_requests_.begin();
504 i != pending_requests_.end(); ++i) { 504 i != pending_requests_.end(); ++i) {
505 if (i->second == job) 505 if (i->second == job)
506 return true; 506 return true;
507 } 507 }
508 return false; 508 return false;
509 } 509 }
510 510
511 bool URLDataManagerBackend::StartRequest(const net::URLRequest* request, 511 bool URLDataManagerBackend::StartRequest(const net::URLRequest* request,
512 URLRequestChromeJob* job) { 512 URLRequestChromeJob* job) {
513 // NOTE: this duplicates code in web_ui_url_loader_factory.cc's URLLoaderImpl. 513 // NOTE: this duplicates code in web_ui_url_loader_factory.cc's
514 // StartURLLoader.
514 if (!CheckURLIsValid(request->url())) 515 if (!CheckURLIsValid(request->url()))
515 return false; 516 return false;
516 517
517 URLDataSourceImpl* source = GetDataSourceFromURL(request->url()); 518 URLDataSourceImpl* source = GetDataSourceFromURL(request->url());
518 if (!source) 519 if (!source)
519 return false; 520 return false;
520 521
521 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request); 522 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request);
522 if (!source->source()->ShouldServiceRequest( 523 if (!source->source()->ShouldServiceRequest(
523 request->url(), info ? info->GetContext() : nullptr, 524 request->url(), info ? info->GetContext() : nullptr,
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 } 737 }
737 738
738 } // namespace 739 } // namespace
739 740
740 net::URLRequestJobFactory::ProtocolHandler* CreateDevToolsProtocolHandler( 741 net::URLRequestJobFactory::ProtocolHandler* CreateDevToolsProtocolHandler(
741 ResourceContext* resource_context) { 742 ResourceContext* resource_context) {
742 return new DevToolsJobFactory(resource_context); 743 return new DevToolsJobFactory(resource_context);
743 } 744 }
744 745
745 } // namespace content 746 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/webui/web_ui_url_loader_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698