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

Side by Side Diff: chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc

Issue 138553004: Move component updater artifacts into component_updater namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/browser/ui/webui/components_ui.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 "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate. h" 5 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate. h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 g_external_protocol_handler_delegate); 183 g_external_protocol_handler_delegate);
184 } 184 }
185 #endif // !defined(OS_ANDROID) 185 #endif // !defined(OS_ANDROID)
186 186
187 void AppendComponentUpdaterThrottles( 187 void AppendComponentUpdaterThrottles(
188 net::URLRequest* request, 188 net::URLRequest* request,
189 content::ResourceContext* resource_context, 189 content::ResourceContext* resource_context,
190 ResourceType::Type resource_type, 190 ResourceType::Type resource_type,
191 ScopedVector<content::ResourceThrottle>* throttles) { 191 ScopedVector<content::ResourceThrottle>* throttles) {
192 const char* crx_id = NULL; 192 const char* crx_id = NULL;
193 ComponentUpdateService* cus = g_browser_process->component_updater(); 193 component_updater::ComponentUpdateService* cus =
194 g_browser_process->component_updater();
194 if (!cus) 195 if (!cus)
195 return; 196 return;
196 // Check for PNaCl pexe request. 197 // Check for PNaCl pexe request.
197 if (resource_type == ResourceType::OBJECT) { 198 if (resource_type == ResourceType::OBJECT) {
198 const net::HttpRequestHeaders& headers = request->extra_request_headers(); 199 const net::HttpRequestHeaders& headers = request->extra_request_headers();
199 std::string accept_headers; 200 std::string accept_headers;
200 if (headers.GetHeader("Accept", &accept_headers)) { 201 if (headers.GetHeader("Accept", &accept_headers)) {
201 if (accept_headers.find("application/x-pnacl") != std::string::npos && 202 if (accept_headers.find("application/x-pnacl") != std::string::npos &&
202 pnacl::NeedsOnDemandUpdate()) 203 pnacl::NeedsOnDemandUpdate())
203 crx_id = "hnimpnehoodheedghdeeijklkeaacbdc"; 204 crx_id = "hnimpnehoodheedghdeeijklkeaacbdc";
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 signin::AppendMirrorRequestHeaderIfPossible(request, redirect_url, io_data, 628 signin::AppendMirrorRequestHeaderIfPossible(request, redirect_url, io_data,
628 info->GetChildID(), info->GetRouteID()); 629 info->GetChildID(), info->GetRouteID());
629 } 630 }
630 631
631 // static 632 // static
632 void ChromeResourceDispatcherHostDelegate:: 633 void ChromeResourceDispatcherHostDelegate::
633 SetExternalProtocolHandlerDelegateForTesting( 634 SetExternalProtocolHandlerDelegateForTesting(
634 ExternalProtocolHandler::Delegate* delegate) { 635 ExternalProtocolHandler::Delegate* delegate) {
635 g_external_protocol_handler_delegate = delegate; 636 g_external_protocol_handler_delegate = delegate;
636 } 637 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/browser/ui/webui/components_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698