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

Unified Diff: base/prefs/json_pref_store.cc

Issue 1001833005: Update from https://crrev.com/320343 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Supress Created 5 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
« no previous file with comments | « base/prefs/base_prefs_switches.cc ('k') | base/prefs/pref_member.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/json_pref_store.cc
diff --git a/base/prefs/json_pref_store.cc b/base/prefs/json_pref_store.cc
index 2e34b50134180657f1dc8c4c489c72ea46c84d96..47cd424d9cc9dfa7e8051d13ce72316a6bbd78b9 100644
--- a/base/prefs/json_pref_store.cc
+++ b/base/prefs/json_pref_store.cc
@@ -8,14 +8,12 @@
#include "base/bind.h"
#include "base/callback.h"
-#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/json/json_file_value_serializer.h"
#include "base/json/json_string_value_serializer.h"
#include "base/memory/ref_counted.h"
#include "base/metrics/histogram.h"
-#include "base/prefs/base_prefs_switches.h"
#include "base/prefs/pref_filter.h"
#include "base/sequenced_task_runner.h"
#include "base/strings/string_util.h"
@@ -400,10 +398,10 @@ bool JsonPrefStore::SerializeData(std::string* output) {
pref_filter_->FilterSerializeData(prefs_.get());
JSONStringValueSerializer serializer(output);
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kPrettyPrintPrefs)) {
- serializer.set_pretty_print(true);
- }
+ // Not pretty-printing prefs shrinks pref file size by ~30%. To obtain
+ // readable prefs for debugging purposes, you can dump your prefs into any
+ // command-line or online JSON pretty printing tool.
+ serializer.set_pretty_print(false);
return serializer.Serialize(*prefs_);
}
« no previous file with comments | « base/prefs/base_prefs_switches.cc ('k') | base/prefs/pref_member.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698