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

Unified Diff: chrome/browser/renderer_host/safe_browsing_resource_throttle_factory.h

Issue 431433002: Make SafeBrowsingResourceThrottleFactory::RegisterFactory() not optional. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/renderer_host/safe_browsing_resource_throttle_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/safe_browsing_resource_throttle_factory.h
diff --git a/chrome/browser/renderer_host/safe_browsing_resource_throttle_factory.h b/chrome/browser/renderer_host/safe_browsing_resource_throttle_factory.h
index 4a37de440fb6292465ae64926069b4a4507a57c4..4c1821e0b2bee8be2bc222cc0c6f0fac545feedd 100644
--- a/chrome/browser/renderer_host/safe_browsing_resource_throttle_factory.h
+++ b/chrome/browser/renderer_host/safe_browsing_resource_throttle_factory.h
@@ -18,19 +18,15 @@ namespace net {
class URLRequest;
}
-// Factory for creating a SafeBrowsingResourceThrottle. When FULL_SAFE_BROWSING
-// is enabled, creates a SafeBrowsingResourceThrottle. When MOBILE_SAFE_BROWSING
-// is enabled, the default implementation creates a null resource throttle,
-// therefore, a factory has to be registered before using this.
+// Factory for creating a SafeBrowsingResourceThrottle. If a factory is
+// registered, the factory's CreateResourceThrottle() is called. Otherwise,
+// when FULL_SAFE_BROWSING is enabled, a new SafeBrowsingResourceThrottle is
+// returned, or NULL if MOBILE_SAFE_BROWSING is enabled.
class SafeBrowsingResourceThrottleFactory {
public:
-#if defined(FULL_SAFE_BROWSING) || defined(MOBILE_SAFE_BROWSING)
// Registers a factory. Does not take the ownership of the factory. The
// caller has to make sure the factory stays alive and properly destroyed.
- static void RegisterFactory(SafeBrowsingResourceThrottleFactory* factory) {
- factory_ = factory;
- }
-#endif
+ static void RegisterFactory(SafeBrowsingResourceThrottleFactory* factory);
// Creates a new resource throttle for safe browsing
static content::ResourceThrottle* Create(
« no previous file with comments | « no previous file | chrome/browser/renderer_host/safe_browsing_resource_throttle_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698