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

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: changes for sky 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
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/renderer_host/safe_browsing_resource_throttle.h » ('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 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 ScopedVector<content::ResourceThrottle>* throttles) { 492 ScopedVector<content::ResourceThrottle>* throttles) {
493 ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context); 493 ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
494 #if defined(FULL_SAFE_BROWSING) || defined(MOBILE_SAFE_BROWSING) 494 #if defined(FULL_SAFE_BROWSING) || defined(MOBILE_SAFE_BROWSING)
495 // Insert safe browsing at the front of the list, so it gets to decide on 495 // Insert safe browsing at the front of the list, so it gets to decide on
496 // policies first. 496 // policies first.
497 if (io_data->safe_browsing_enabled()->GetValue() 497 if (io_data->safe_browsing_enabled()->GetValue()
498 #if defined(OS_ANDROID) 498 #if defined(OS_ANDROID)
499 || io_data->IsDataReductionProxyEnabled() 499 || io_data->IsDataReductionProxyEnabled()
500 #endif 500 #endif
501 ) { 501 ) {
502 bool is_subresource_request =
503 resource_type != content::RESOURCE_TYPE_MAIN_FRAME;
504 content::ResourceThrottle* throttle = 502 content::ResourceThrottle* throttle =
505 SafeBrowsingResourceThrottleFactory::Create(request, 503 SafeBrowsingResourceThrottleFactory::Create(request,
506 resource_context, 504 resource_context,
507 is_subresource_request, 505 resource_type,
508 safe_browsing_.get()); 506 safe_browsing_.get());
509 if (throttle) 507 if (throttle)
510 throttles->push_back(throttle); 508 throttles->push_back(throttle);
511 } 509 }
512 #endif 510 #endif
513 511
514 #if defined(ENABLE_MANAGED_USERS) 512 #if defined(ENABLE_MANAGED_USERS)
515 bool is_subresource_request = 513 bool is_subresource_request =
516 resource_type != content::RESOURCE_TYPE_MAIN_FRAME; 514 resource_type != content::RESOURCE_TYPE_MAIN_FRAME;
517 throttles->push_back(new SupervisedUserResourceThrottle( 515 throttles->push_back(new SupervisedUserResourceThrottle(
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 url_request->GetTotalReceivedBytes())); 749 url_request->GetTotalReceivedBytes()));
752 } 750 }
753 } 751 }
754 752
755 // static 753 // static
756 void ChromeResourceDispatcherHostDelegate:: 754 void ChromeResourceDispatcherHostDelegate::
757 SetExternalProtocolHandlerDelegateForTesting( 755 SetExternalProtocolHandlerDelegateForTesting(
758 ExternalProtocolHandler::Delegate* delegate) { 756 ExternalProtocolHandler::Delegate* delegate) {
759 g_external_protocol_handler_delegate = delegate; 757 g_external_protocol_handler_delegate = delegate;
760 } 758 }
OLDNEW
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/renderer_host/safe_browsing_resource_throttle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698