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

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

Issue 2149253003: Switch various ValueTypeToString()s to base::Value::GetTypeName(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@value
Patch Set: fix tests Created 4 years, 5 months 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 44c6eb9d6ab3023398e8ea80617b58fd8e1fd051..ec1cf7859341bf2364de71d1432dee4fb9de61f9 100644
--- a/chrome/browser/extensions/policy_handlers.cc
+++ b/chrome/browser/extensions/policy_handlers.cc
@@ -79,10 +79,9 @@ bool ExtensionListPolicyHandler::CheckAndGetList(
entry != list_value->end(); ++entry) {
std::string id;
if (!(*entry)->GetAsString(&id)) {
- errors->AddError(policy_name(),
- entry - list_value->begin(),
+ errors->AddError(policy_name(), entry - list_value->begin(),
IDS_POLICY_TYPE_ERROR,
- ValueTypeToString(base::Value::TYPE_STRING));
+ base::Value::GetTypeName(base::Value::TYPE_STRING));
continue;
}
if (!(allow_wildcards_ && id == "*") && !crx_file::id_util::IdIsValid(id)) {
@@ -148,10 +147,9 @@ bool ExtensionInstallForcelistPolicyHandler::ParseList(
std::string entry_string;
if (!(*entry)->GetAsString(&entry_string)) {
if (errors) {
- errors->AddError(policy_name(),
- entry - policy_list_value->begin(),
+ errors->AddError(policy_name(), entry - policy_list_value->begin(),
IDS_POLICY_TYPE_ERROR,
- ValueTypeToString(base::Value::TYPE_STRING));
+ base::Value::GetTypeName(base::Value::TYPE_STRING));
}
continue;
}
@@ -221,10 +219,9 @@ bool ExtensionURLPatternListPolicyHandler::CheckPolicySettings(
entry != list_value->end(); ++entry) {
std::string url_pattern_string;
if (!(*entry)->GetAsString(&url_pattern_string)) {
- errors->AddError(policy_name(),
- entry - list_value->begin(),
+ errors->AddError(policy_name(), entry - list_value->begin(),
IDS_POLICY_TYPE_ERROR,
- ValueTypeToString(base::Value::TYPE_STRING));
+ base::Value::GetTypeName(base::Value::TYPE_STRING));
return false;
}

Powered by Google App Engine
This is Rietveld 408576698