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

Unified Diff: chrome/browser/extensions/api/proxy/proxy_api_helpers.cc

Issue 815363002: replace COMPILE_ASSERT with static_assert in chrome/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 6 years 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/extensions/api/proxy/proxy_api_helpers.cc
diff --git a/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc b/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
index 64a4282c836cb962f7f8869c0cfbee9651517a80..54f935767598ca20b8ee32bd63b4d8f2df4e1301 100644
--- a/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
+++ b/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
@@ -220,7 +220,7 @@ bool GetProxyRulesStringFromExtensionPref(
}
}
- COMPILE_ASSERT(keys::SCHEME_ALL == 0, singleProxy_must_be_first_option);
+ static_assert(keys::SCHEME_ALL == 0, "SCHEME_ALL must be the first value");
// Handle case that only singleProxy is specified.
if (has_proxy[keys::SCHEME_ALL]) {
@@ -409,9 +409,10 @@ base::DictionaryValue* CreateProxyRulesDict(
break;
}
- // If we add a new scheme some time, we need to also store a new dictionary
+ // If we add a new scheme sometime, we need to also store a new dictionary
// representing this scheme in the code above.
- COMPILE_ASSERT(keys::SCHEME_MAX == 4, SCHEME_FORGOTTEN);
+ static_assert(keys::SCHEME_MAX == 4,
+ "rules need to be updated along with schemes");
if (proxy_config.HasBypassList()) {
std::string bypass_list_string;

Powered by Google App Engine
This is Rietveld 408576698