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

Unified Diff: components/policy/core/browser/url_blacklist_policy_handler.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: components/policy/core/browser/url_blacklist_policy_handler.cc
diff --git a/components/policy/core/browser/url_blacklist_policy_handler.cc b/components/policy/core/browser/url_blacklist_policy_handler.cc
index cdbe8afb238ad06a057be56dbdc8f192b3d463e4..49de7d03e0f3aed8e88e5dd5b552bd9c66a679ea 100644
--- a/components/policy/core/browser/url_blacklist_policy_handler.cc
+++ b/components/policy/core/browser/url_blacklist_policy_handler.cc
@@ -27,14 +27,14 @@ bool URLBlacklistPolicyHandler::CheckPolicySettings(const PolicyMap& policies,
policies.GetValue(key::kDisabledSchemes);
const base::Value* url_blacklist = policies.GetValue(key::kURLBlacklist);
- if (disabled_schemes && !disabled_schemes->IsType(base::Value::TYPE_LIST)) {
+ if (disabled_schemes && !disabled_schemes->IsType(base::Value::Type::LIST)) {
errors->AddError(key::kDisabledSchemes, IDS_POLICY_TYPE_ERROR,
- base::Value::GetTypeName(base::Value::TYPE_LIST));
+ base::Value::GetTypeName(base::Value::Type::LIST));
}
- if (url_blacklist && !url_blacklist->IsType(base::Value::TYPE_LIST)) {
+ if (url_blacklist && !url_blacklist->IsType(base::Value::Type::LIST)) {
errors->AddError(key::kURLBlacklist, IDS_POLICY_TYPE_ERROR,
- base::Value::GetTypeName(base::Value::TYPE_LIST));
+ base::Value::GetTypeName(base::Value::Type::LIST));
}
return true;
@@ -69,7 +69,7 @@ void URLBlacklistPolicyHandler::ApplyPolicySettings(const PolicyMap& policies,
if (url_blacklist) {
for (const auto& entry : *url_blacklist) {
- if (entry->IsType(base::Value::TYPE_STRING))
+ if (entry->IsType(base::Value::Type::STRING))
merged_url_blacklist->Append(entry->CreateDeepCopy());
}
}

Powered by Google App Engine
This is Rietveld 408576698