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

Unified Diff: chrome/browser/extensions/policy_handlers.cc

Issue 2539363004: Make base::Value::TYPE a scoped enum. (Closed)
Patch Set: Rebase Created 4 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/policy_handlers.cc
diff --git a/chrome/browser/extensions/policy_handlers.cc b/chrome/browser/extensions/policy_handlers.cc
index b0963d63112f7b7dcda894d684b2b4087a90d661..fa8015808ffdd7f56d3dc2106a2424ab500ba40f 100644
--- a/chrome/browser/extensions/policy_handlers.cc
+++ b/chrome/browser/extensions/policy_handlers.cc
@@ -28,7 +28,7 @@ namespace extensions {
ExtensionListPolicyHandler::ExtensionListPolicyHandler(const char* policy_name,
const char* pref_path,
bool allow_wildcards)
- : policy::TypeCheckingPolicyHandler(policy_name, base::Value::TYPE_LIST),
+ : policy::TypeCheckingPolicyHandler(policy_name, base::Value::Type::LIST),
pref_path_(pref_path),
allow_wildcards_(allow_wildcards) {}
@@ -81,7 +81,7 @@ bool ExtensionListPolicyHandler::CheckAndGetList(
if (!(*entry)->GetAsString(&id)) {
errors->AddError(policy_name(), entry - list_value->begin(),
IDS_POLICY_TYPE_ERROR,
- base::Value::GetTypeName(base::Value::TYPE_STRING));
+ base::Value::GetTypeName(base::Value::Type::STRING));
continue;
}
if (!(allow_wildcards_ && id == "*") && !crx_file::id_util::IdIsValid(id)) {
@@ -103,7 +103,7 @@ bool ExtensionListPolicyHandler::CheckAndGetList(
ExtensionInstallForcelistPolicyHandler::ExtensionInstallForcelistPolicyHandler()
: policy::TypeCheckingPolicyHandler(policy::key::kExtensionInstallForcelist,
- base::Value::TYPE_LIST) {}
+ base::Value::Type::LIST) {}
ExtensionInstallForcelistPolicyHandler::
~ExtensionInstallForcelistPolicyHandler() {}
@@ -149,7 +149,7 @@ bool ExtensionInstallForcelistPolicyHandler::ParseList(
if (errors) {
errors->AddError(policy_name(), entry - policy_list_value->begin(),
IDS_POLICY_TYPE_ERROR,
- base::Value::GetTypeName(base::Value::TYPE_STRING));
+ base::Value::GetTypeName(base::Value::Type::STRING));
}
continue;
}
@@ -193,7 +193,7 @@ bool ExtensionInstallForcelistPolicyHandler::ParseList(
ExtensionURLPatternListPolicyHandler::ExtensionURLPatternListPolicyHandler(
const char* policy_name,
const char* pref_path)
- : policy::TypeCheckingPolicyHandler(policy_name, base::Value::TYPE_LIST),
+ : policy::TypeCheckingPolicyHandler(policy_name, base::Value::Type::LIST),
pref_path_(pref_path) {}
ExtensionURLPatternListPolicyHandler::~ExtensionURLPatternListPolicyHandler() {}
@@ -221,7 +221,7 @@ bool ExtensionURLPatternListPolicyHandler::CheckPolicySettings(
if (!(*entry)->GetAsString(&url_pattern_string)) {
errors->AddError(policy_name(), entry - list_value->begin(),
IDS_POLICY_TYPE_ERROR,
- base::Value::GetTypeName(base::Value::TYPE_STRING));
+ base::Value::GetTypeName(base::Value::Type::STRING));
return false;
}
@@ -272,14 +272,14 @@ bool ExtensionSettingsPolicyHandler::CheckPolicySettings(
// |policy_value| is expected to conform to the defined schema. But it's
// not strictly valid since there are additional restrictions.
const base::DictionaryValue* dict_value = NULL;
- DCHECK(policy_value->IsType(base::Value::TYPE_DICTIONARY));
+ DCHECK(policy_value->IsType(base::Value::Type::DICTIONARY));
policy_value->GetAsDictionary(&dict_value);
for (base::DictionaryValue::Iterator it(*dict_value); !it.IsAtEnd();
it.Advance()) {
DCHECK(it.key() == schema_constants::kWildcard ||
crx_file::id_util::IdIsValid(it.key()));
- DCHECK(it.value().IsType(base::Value::TYPE_DICTIONARY));
+ DCHECK(it.value().IsType(base::Value::Type::DICTIONARY));
// Extracts sub dictionary.
const base::DictionaryValue* sub_dict = NULL;
« no previous file with comments | « chrome/browser/extensions/external_provider_impl.cc ('k') | chrome/browser/extensions/webstore_data_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698