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

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

Issue 397853002: Refactor safe-browsing build-config definitions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to pick up safe_browsing_resource_throttle_factory change. Created 6 years, 4 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
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 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 return true; 476 return true;
477 #endif 477 #endif
478 } 478 }
479 479
480 void ChromeResourceDispatcherHostDelegate::AppendStandardResourceThrottles( 480 void ChromeResourceDispatcherHostDelegate::AppendStandardResourceThrottles(
481 net::URLRequest* request, 481 net::URLRequest* request,
482 content::ResourceContext* resource_context, 482 content::ResourceContext* resource_context,
483 ResourceType::Type resource_type, 483 ResourceType::Type resource_type,
484 ScopedVector<content::ResourceThrottle>* throttles) { 484 ScopedVector<content::ResourceThrottle>* throttles) {
485 ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context); 485 ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
486 #if defined(FULL_SAFE_BROWSING) || defined(MOBILE_SAFE_BROWSING) 486 #if defined(SAFE_BROWSING_SERVICE)
487 // Insert safe browsing at the front of the list, so it gets to decide on 487 // Insert safe browsing at the front of the list, so it gets to decide on
488 // policies first. 488 // policies first.
489 if (io_data->safe_browsing_enabled()->GetValue() 489 if (io_data->safe_browsing_enabled()->GetValue()
490 #if defined(OS_ANDROID) 490 #if defined(OS_ANDROID)
491 || io_data->IsDataReductionProxyEnabled() 491 || io_data->IsDataReductionProxyEnabled()
492 #endif 492 #endif
493 ) { 493 ) {
494 bool is_subresource_request = resource_type != ResourceType::MAIN_FRAME; 494 bool is_subresource_request = resource_type != ResourceType::MAIN_FRAME;
495 content::ResourceThrottle* throttle = 495 content::ResourceThrottle* throttle =
496 SafeBrowsingResourceThrottleFactory::Create(request, 496 SafeBrowsingResourceThrottleFactory::Create(request,
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 url_request->GetTotalReceivedBytes())); 731 url_request->GetTotalReceivedBytes()));
732 } 732 }
733 } 733 }
734 734
735 // static 735 // static
736 void ChromeResourceDispatcherHostDelegate:: 736 void ChromeResourceDispatcherHostDelegate::
737 SetExternalProtocolHandlerDelegateForTesting( 737 SetExternalProtocolHandlerDelegateForTesting(
738 ExternalProtocolHandler::Delegate* delegate) { 738 ExternalProtocolHandler::Delegate* delegate) {
739 g_external_protocol_handler_delegate = delegate; 739 g_external_protocol_handler_delegate = delegate;
740 } 740 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698