Index: components/safe_browsing_db/v4_feature_list.cc |
diff --git a/components/safe_browsing_db/v4_feature_list.cc b/components/safe_browsing_db/v4_feature_list.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1f104afcd78a9c3edfec263381f7e7a8f72829f2 |
--- /dev/null |
+++ b/components/safe_browsing_db/v4_feature_list.cc |
@@ -0,0 +1,38 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "base/feature_list.h" |
+#include "components/safe_browsing_db/v4_feature_list.h" |
+ |
+namespace safe_browsing { |
+ |
+#ifdef NDEBUG |
Nathan Parker
2016/09/28 22:25:55
I'm wondering if we should not auto-enable this on
vakh (use Gerrit instead)
2016/09/28 23:00:01
I agree. How about I test all that after submittin
Nathan Parker
2016/09/28 23:50:14
Sure, though the flags look simple: https://g3doc.
|
+namespace { |
+const base::Feature kLocalDatabaseManagerEnabled{ |
+ "SafeBrowsingV4LocalDatabaseManagerEnabled", |
+ base::FEATURE_DISABLED_BY_DEFAULT}; |
+ |
+const base::Feature kParallelCheckEnabled{"SafeBrowingV4ParallelCheckEnabled", |
+ base::FEATURE_DISABLED_BY_DEFAULT}; |
+} // namespace |
+#endif |
+ |
+bool V4FeatureList::IsLocalDatabaseManagerEnabled() { |
+#ifndef NDEBUG |
+ return true; |
+#else |
+ return IsV4ParallelCheckEnabled() || |
+ base::FeatureList::IsEnabled(kLocalDatabaseManagerEnabled); |
+#endif |
+} |
+ |
+bool V4FeatureList::IsParallelCheckEnabled() { |
+#ifndef NDEBUG |
+ return true; |
+#else |
+ return base::FeatureList::IsEnabled(kParallelCheckEnabled); |
+#endif |
+} |
+ |
+} // namespace safe_browsing |