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
3 // found in the LICENSE file.
5 #include "chrome/browser/renderer_host/safe_browsing_resource_throttle_factory.h"
6 #if defined(FULL_SAFE_BROWSING)
7 #include "chrome/browser/renderer_host/safe_browsing_resource_throttle.h"
10 using content::ResourceThrottle
;
13 SafeBrowsingResourceThrottleFactory
*
14 SafeBrowsingResourceThrottleFactory::factory_
= NULL
;
17 ResourceThrottle
* SafeBrowsingResourceThrottleFactory::Create(
18 net::URLRequest
* request
,
20 SafeBrowsingService
* service
) {
22 #if defined(FULL_SAFE_BROWSING)
23 return new SafeBrowsingResourceThrottle(request
, is_subresource
, service
);
24 #elif defined(MOBILE_SAFE_BROWSING)
26 return factory_
->CreateResourceThrottle(request
, is_subresource
, service
);
29 #error Need to define {FULL|MOBILE} SAFE_BROWSING mode.