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

Unified Diff: components/password_manager/core/browser/login_database.cc

Issue 1468803002: Switch to static_assert. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@assert1
Patch Set: message cleanup Created 5 years, 1 month 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: components/password_manager/core/browser/login_database.cc
diff --git a/components/password_manager/core/browser/login_database.cc b/components/password_manager/core/browser/login_database.cc
index b816f62943fc78af3da6826d29d2b3205d7b82f5..50861a350e51625e7fde29cae1fd40f803fab3ef 100644
--- a/components/password_manager/core/browser/login_database.cc
+++ b/components/password_manager/core/browser/login_database.cc
@@ -237,7 +237,7 @@ void LogPasswordReuseMetrics(const std::vector<std::string>& signon_realms) {
domain_to_registry_controlled_domain[domain];
Scheme scheme = SCHEME_HTTP;
- COMPILE_ASSERT(arraysize(kAllSchemes) == 2, "Update this logic");
+ static_assert(arraysize(kAllSchemes) == 2, "Update this logic");
if (signon_realm_url.SchemeIs(url::kHttpsScheme))
scheme = SCHEME_HTTPS;
else if (!signon_realm_url.SchemeIs(url::kHttpScheme))
@@ -259,7 +259,7 @@ void LogPasswordReuseMetrics(const std::vector<std::string>& signon_realms) {
domain_to_registry_controlled_domain[domain];
Scheme other_scheme = scheme == SCHEME_HTTP ? SCHEME_HTTPS : SCHEME_HTTP;
- COMPILE_ASSERT(arraysize(kAllSchemes) == 2, "Update |other_scheme|");
+ static_assert(arraysize(kAllSchemes) == 2, "Update |other_scheme|");
// Discount the account at hand from the number of accounts with the same
// domain and scheme.
@@ -288,7 +288,7 @@ void LogPasswordReuseMetrics(const std::vector<std::string>& signon_realms) {
std::string source_realm_kind =
scheme == SCHEME_HTTP ? "FromHttpRealm" : "FromHttpsRealm";
- COMPILE_ASSERT(arraysize(kAllSchemes) == 2, "Update |source_realm_kind|");
+ static_assert(arraysize(kAllSchemes) == 2, "Update |source_realm_kind|");
// So far, the calculation has been carried out once per "source" domain,
// but the metrics need to be recorded on a per-account basis. The set of
« no previous file with comments | « components/mus/public/cpp/window_property.h ('k') | components/password_manager/core/browser/login_database_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698