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

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

Issue 9590002: JSONWriter cleanup: integrate pretty print into write options. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflict 7. Created 8 years, 9 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 6d6203e94b3995199c253a2b31404eba092b963d..9c0c94dfec1765ab5d6c9cae8f834c7ccc6fa7dc 100644
--- a/chrome/browser/policy/configuration_policy_handler.cc
+++ b/chrome/browser/policy/configuration_policy_handler.cc
@@ -164,7 +164,10 @@ void ConfigurationPolicyHandler::PrepareForDisplaying(
if (entry.value->GetAsDictionary(&value)) {
std::string json_string;
base::JSONWriter::WriteWithOptions(
- value, true, base::JSONWriter::OPTIONS_DO_NOT_ESCAPE, &json_string);
+ value,
+ base::JSONWriter::OPTIONS_DO_NOT_ESCAPE |
+ base::JSONWriter::OPTIONS_PRETTY_PRINT,
+ &json_string);
StringValue* string_value = Value::CreateStringValue(json_string);
policies->Set(it->first, entry.level, entry.scope, string_value);
}
« no previous file with comments | « chrome/browser/net/net_log_logger.cc ('k') | chrome/browser/policy/configuration_policy_handler_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698