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

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

Issue 1081403002: Refactor safe-browsing build-config definitions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again to fix collision Created 5 years, 8 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
Index: chrome/browser/renderer_host/safe_browsing_resource_throttle_factory.cc
diff --git a/chrome/browser/renderer_host/safe_browsing_resource_throttle_factory.cc b/chrome/browser/renderer_host/safe_browsing_resource_throttle_factory.cc
index 99c913f3347799d59d7cab8f273de3129e556131..ab30f2b1f93430934eb155ef9ea9b8be8b4cc142 100644
--- a/chrome/browser/renderer_host/safe_browsing_resource_throttle_factory.cc
+++ b/chrome/browser/renderer_host/safe_browsing_resource_throttle_factory.cc
@@ -5,7 +5,16 @@
#include "chrome/browser/renderer_host/safe_browsing_resource_throttle_factory.h"
#include "content/public/browser/resource_context.h"
-#if defined(FULL_SAFE_BROWSING)
+
+// Compiling this file only makes sense if SAFE_BROWSING_SERVICE is enabled.
+// If the build is breaking here, it probably means that a gyp or gn file has
+// been modified to build this file with safe_browsing=0 (gn
+// safe_browsing_mode=0).
+#if !defined(SAFE_BROWSING_SERVICE)
+#error Need to define safe_browsing mode.
+#endif
+
+#if defined(SAFE_BROWSING_DB_LOCAL)
#include "chrome/browser/renderer_host/safe_browsing_resource_throttle.h"
#endif
@@ -31,11 +40,10 @@ ResourceThrottle* SafeBrowsingResourceThrottleFactory::Create(
return factory_->CreateResourceThrottle(
request, resource_context, resource_type, service);
-#if defined(FULL_SAFE_BROWSING)
+#if defined(SAFE_BROWSING_DB_LOCAL)
+ // Throttle consults a local database before proceeding.
return new SafeBrowsingResourceThrottle(request, resource_type, service);
-#elif defined(MOBILE_SAFE_BROWSING)
- return NULL;
#else
-#error Need to define {FULL|MOBILE} SAFE_BROWSING mode.
+ return NULL;
#endif
}

Powered by Google App Engine
This is Rietveld 408576698