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

Side by Side Diff: chrome/browser/renderer_host/safe_browsing_resource_throttle_factory.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
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/safe_browsing_resource_throttle_factory.h " 5 #include "chrome/browser/renderer_host/safe_browsing_resource_throttle_factory.h "
6 6
7 #include "content/public/browser/resource_context.h" 7 #include "content/public/browser/resource_context.h"
8 #if defined(FULL_SAFE_BROWSING) 8 #if defined(FULL_SAFE_BROWSING)
9 #include "chrome/browser/renderer_host/safe_browsing_resource_throttle.h" 9 #include "chrome/browser/renderer_host/safe_browsing_resource_throttle.h"
10 #endif 10 #endif
11 11
12 using content::ResourceThrottle; 12 using content::ResourceThrottle;
13 13
14 // static 14 // static
15 SafeBrowsingResourceThrottleFactory* 15 SafeBrowsingResourceThrottleFactory*
16 SafeBrowsingResourceThrottleFactory::factory_ = NULL; 16 SafeBrowsingResourceThrottleFactory::factory_ = NULL;
17 17
18 // static 18 // static
19 void SafeBrowsingResourceThrottleFactory::RegisterFactory( 19 void SafeBrowsingResourceThrottleFactory::RegisterFactory(
20 SafeBrowsingResourceThrottleFactory* factory) { 20 SafeBrowsingResourceThrottleFactory* factory) {
21 factory_ = factory; 21 factory_ = factory;
22 } 22 }
23 23
24 // static 24 // static
25 ResourceThrottle* SafeBrowsingResourceThrottleFactory::Create( 25 ResourceThrottle* SafeBrowsingResourceThrottleFactory::Create(
26 net::URLRequest* request, 26 net::URLRequest* request,
27 content::ResourceContext* resource_context, 27 content::ResourceContext* resource_context,
28 bool is_subresource, 28 content::ResourceType resource_type,
29 SafeBrowsingService* service) { 29 SafeBrowsingService* service) {
30 if (factory_) 30 if (factory_)
31 return factory_->CreateResourceThrottle( 31 return factory_->CreateResourceThrottle(
32 request, resource_context, is_subresource, service); 32 request, resource_context, resource_type, service);
33 33
34 #if defined(FULL_SAFE_BROWSING) 34 #if defined(FULL_SAFE_BROWSING)
35 return new SafeBrowsingResourceThrottle(request, is_subresource, service); 35 return new SafeBrowsingResourceThrottle(request, resource_type, service);
36 #elif defined(MOBILE_SAFE_BROWSING) 36 #elif defined(MOBILE_SAFE_BROWSING)
37 return NULL; 37 return NULL;
38 #else 38 #else
39 #error Need to define {FULL|MOBILE} SAFE_BROWSING mode. 39 #error Need to define {FULL|MOBILE} SAFE_BROWSING mode.
40 #endif 40 #endif
41 } 41 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/safe_browsing_resource_throttle_factory.h ('k') | chrome/browser/safe_browsing/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698