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

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

Issue 586793003: Safebrowsing: Honor the metadata from malware fullhash results in SB API 3.0. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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
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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 ScopedVector<content::ResourceThrottle>* throttles) { 486 ScopedVector<content::ResourceThrottle>* throttles) {
487 ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context); 487 ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
488 #if defined(FULL_SAFE_BROWSING) || defined(MOBILE_SAFE_BROWSING) 488 #if defined(FULL_SAFE_BROWSING) || defined(MOBILE_SAFE_BROWSING)
489 // Insert safe browsing at the front of the list, so it gets to decide on 489 // Insert safe browsing at the front of the list, so it gets to decide on
490 // policies first. 490 // policies first.
491 if (io_data->safe_browsing_enabled()->GetValue() 491 if (io_data->safe_browsing_enabled()->GetValue()
492 #if defined(OS_ANDROID) 492 #if defined(OS_ANDROID)
493 || io_data->IsDataReductionProxyEnabled() 493 || io_data->IsDataReductionProxyEnabled()
494 #endif 494 #endif
495 ) { 495 ) {
496 bool is_subresource_request =
497 resource_type != content::RESOURCE_TYPE_MAIN_FRAME;
498 content::ResourceThrottle* throttle = 496 content::ResourceThrottle* throttle =
499 SafeBrowsingResourceThrottleFactory::Create(request, 497 SafeBrowsingResourceThrottleFactory::Create(request,
500 resource_context, 498 resource_context,
501 is_subresource_request, 499 resource_type,
502 safe_browsing_.get()); 500 safe_browsing_.get());
503 if (throttle) 501 if (throttle)
504 throttles->push_back(throttle); 502 throttles->push_back(throttle);
505 } 503 }
506 #endif 504 #endif
507 505
508 #if defined(ENABLE_MANAGED_USERS) 506 #if defined(ENABLE_MANAGED_USERS)
509 bool is_subresource_request = 507 bool is_subresource_request =
510 resource_type != content::RESOURCE_TYPE_MAIN_FRAME; 508 resource_type != content::RESOURCE_TYPE_MAIN_FRAME;
511 throttles->push_back(new SupervisedUserResourceThrottle( 509 throttles->push_back(new SupervisedUserResourceThrottle(
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 url_request->GetTotalReceivedBytes())); 735 url_request->GetTotalReceivedBytes()));
738 } 736 }
739 } 737 }
740 738
741 // static 739 // static
742 void ChromeResourceDispatcherHostDelegate:: 740 void ChromeResourceDispatcherHostDelegate::
743 SetExternalProtocolHandlerDelegateForTesting( 741 SetExternalProtocolHandlerDelegateForTesting(
744 ExternalProtocolHandler::Delegate* delegate) { 742 ExternalProtocolHandler::Delegate* delegate) {
745 g_external_protocol_handler_delegate = delegate; 743 g_external_protocol_handler_delegate = delegate;
746 } 744 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698