NaCl: Update revision in DEPS, r12770 -> r12773
[chromium-blink-merge.git] / chrome / browser / renderer_host / safe_browsing_resource_throttle_factory.cc
blob88f99f8879c16f914b6089c1a47c2c13bc300b56
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"
8 #endif
10 using content::ResourceThrottle;
12 // static
13 SafeBrowsingResourceThrottleFactory*
14 SafeBrowsingResourceThrottleFactory::factory_ = NULL;
16 // static
17 ResourceThrottle* SafeBrowsingResourceThrottleFactory::Create(
18 net::URLRequest* request,
19 bool is_subresource,
20 SafeBrowsingService* service) {
22 #if defined(FULL_SAFE_BROWSING)
23 return new SafeBrowsingResourceThrottle(request, is_subresource, service);
24 #elif defined(MOBILE_SAFE_BROWSING)
25 if (factory_)
26 return factory_->CreateResourceThrottle(request, is_subresource, service);
27 return NULL;
28 #else
29 #error Need to define {FULL|MOBILE} SAFE_BROWSING mode.
30 #endif