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

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 satiate trybots 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 resource_type, 483 ResourceType 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 = 494 bool is_subresource_request =
495 resource_type != content::RESOURCE_TYPE_MAIN_FRAME; 495 resource_type != content::RESOURCE_TYPE_MAIN_FRAME;
496 content::ResourceThrottle* throttle = 496 content::ResourceThrottle* throttle =
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 url_request->GetTotalReceivedBytes())); 733 url_request->GetTotalReceivedBytes()));
734 } 734 }
735 } 735 }
736 736
737 // static 737 // static
738 void ChromeResourceDispatcherHostDelegate:: 738 void ChromeResourceDispatcherHostDelegate::
739 SetExternalProtocolHandlerDelegateForTesting( 739 SetExternalProtocolHandlerDelegateForTesting(
740 ExternalProtocolHandler::Delegate* delegate) { 740 ExternalProtocolHandler::Delegate* delegate) {
741 g_external_protocol_handler_delegate = delegate; 741 g_external_protocol_handler_delegate = delegate;
742 } 742 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698