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

Unified Diff: components/policy/core/browser/configuration_policy_handler.cc

Issue 2151793002: Add base::Value::GetTypeName(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win build 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: components/policy/core/browser/configuration_policy_handler.cc
diff --git a/components/policy/core/browser/configuration_policy_handler.cc b/components/policy/core/browser/configuration_policy_handler.cc
index c7b3afa5b599f7b5424868fbe54ecfe153463699..c5d4bed0f39cb081e588faf1bf639c3f412724e7 100644
--- a/components/policy/core/browser/configuration_policy_handler.cc
+++ b/components/policy/core/browser/configuration_policy_handler.cc
@@ -30,18 +30,7 @@ namespace policy {
// static
std::string ConfigurationPolicyHandler::ValueTypeToString(
base::Value::Type type) {
- static const char* strings[] = {
- "null",
- "boolean",
- "integer",
- "double",
- "string",
- "binary",
- "dictionary",
- "list"
- };
- CHECK(static_cast<size_t>(type) < arraysize(strings));
- return std::string(strings[type]);
+ return std::string(base::Value::GetTypeName(type));
}
ConfigurationPolicyHandler::ConfigurationPolicyHandler() {

Powered by Google App Engine
This is Rietveld 408576698