| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_SAFE_BROWSING_DB_V4_FEATURE_LIST_H_ | 5 #ifndef COMPONENTS_SAFE_BROWSING_DB_V4_FEATURE_LIST_H_ |
| 6 #define COMPONENTS_SAFE_BROWSING_DB_V4_FEATURE_LIST_H_ | 6 #define COMPONENTS_SAFE_BROWSING_DB_V4_FEATURE_LIST_H_ |
| 7 | 7 |
| 8 namespace safe_browsing { | 8 namespace safe_browsing { |
| 9 | 9 |
| 10 // Exposes methods to check whether a particular feature has been enabled | 10 // Exposes methods to check whether a particular feature has been enabled |
| 11 // through Finch. | 11 // through Finch. |
| 12 namespace V4FeatureList { | 12 namespace V4FeatureList { |
| 13 | 13 |
| 14 enum class V4UsageStatus { | 14 // Is the PVer4 database manager enabled? Should be true if either of those |
| 15 // The V4 database manager is not even instantiated i.e. is diabled. All | 15 // below are true. |
| 16 // SafeBrowsing operations use PVer3 code. | 16 bool IsLocalDatabaseManagerEnabled(); |
| 17 V4_DISABLED, | |
| 18 | 17 |
| 19 // The V4 database manager is instantiated, and performs background updates, | 18 // Is the PVer4 database being checked for resource reputation? If this returns |
| 20 // but all SafeBrowsing verdicts are returned using the PVer3 database. | 19 // true, use PVer4 database for CheckBrowseUrl, otherwise use PVer3. |
| 21 V4_INSTANTIATED, | 20 bool IsV4HybridEnabled(); |
| 22 | 21 |
| 23 // Only the V4 database manager is instantiated, PVer3 database manager is | 22 // Is only the PVer4 database being checked for resource reputation? If this |
| 24 // not. All SafeBrowsing verdicts are returned using PVer4 database. | 23 // returns true, use PVer4 database for all SafeBrowsing operations, and don't |
| 25 V4_ONLY | 24 // update the PVer3 database at all. This is the launch configuration. |
| 26 }; | 25 bool IsV4OnlyEnabled(); |
| 27 | |
| 28 V4UsageStatus GetV4UsageStatus(); | |
| 29 | 26 |
| 30 } // namespace V4FeatureList | 27 } // namespace V4FeatureList |
| 31 | 28 |
| 32 } // namespace safe_browsing | 29 } // namespace safe_browsing |
| 33 | 30 |
| 34 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_FEATURE_LIST_H_ | 31 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_FEATURE_LIST_H_ |
| OLD | NEW |