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

Unified Diff: chrome/browser/policy/configuration_policy_handler.cc

Issue 18153007: Add policies to control power management on the Chrome OS login screen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Correct example in policy_templates.json. Created 7 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/policy/configuration_policy_handler.cc
diff --git a/chrome/browser/policy/configuration_policy_handler.cc b/chrome/browser/policy/configuration_policy_handler.cc
index 030b4d524b2ebd87227274289d624f10c208a8f5..a1ba5bb4e40e3612cd182420c0e22a64f2017cf4 100644
--- a/chrome/browser/policy/configuration_policy_handler.cc
+++ b/chrome/browser/policy/configuration_policy_handler.cc
@@ -5,7 +5,6 @@
#include "chrome/browser/policy/configuration_policy_handler.h"
#include <algorithm>
-#include <string>
#include "base/callback.h"
#include "base/files/file_path.h"
@@ -119,22 +118,7 @@ const ProxyModeValidationEntry kProxyModeValidationMap[] = {
};
-// Helper functions ------------------------------------------------------------
-
-std::string ValueTypeToString(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]);
-}
+// Helper function -------------------------------------------------------------
// Utility function that returns a JSON representation of the given |dict| as
// a StringValue. The caller owns the returned object.
@@ -154,6 +138,22 @@ base::StringValue* DictionaryToJSONString(const base::DictionaryValue* dict) {
// ConfigurationPolicyHandler implementation -----------------------------------
+// static
+std::string ConfigurationPolicyHandler::ValueTypeToString(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]);
+}
+
ConfigurationPolicyHandler::ConfigurationPolicyHandler() {
}
« no previous file with comments | « chrome/browser/policy/configuration_policy_handler.h ('k') | chrome/browser/policy/configuration_policy_handler_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698