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

Side by Side Diff: chrome/common/json_pref_store.cc

Issue 9465030: Break two classes defined in json_value_serializer.cc, .h into separate files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/common/json_pref_store.h" 5 #include "chrome/common/json_pref_store.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/file_util.h" 11 #include "base/file_util.h"
12 #include "base/json/json_value_serializer.h" 12 #include "base/json/json_file_value_serializer.h"
13 #include "base/json/json_string_value_serializer.h"
13 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
14 #include "base/message_loop_proxy.h" 15 #include "base/message_loop_proxy.h"
15 #include "base/values.h" 16 #include "base/values.h"
16 17
17 namespace { 18 namespace {
18 19
19 // Some extensions we'll tack on to copies of the Preferences files. 20 // Some extensions we'll tack on to copies of the Preferences files.
20 const FilePath::CharType* kBadExtension = FILE_PATH_LITERAL("bad"); 21 const FilePath::CharType* kBadExtension = FILE_PATH_LITERAL("bad");
21 22
22 // Differentiates file loading between origin thread and passed 23 // Differentiates file loading between origin thread and passed
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 } 299 }
299 300
300 bool JsonPrefStore::SerializeData(std::string* output) { 301 bool JsonPrefStore::SerializeData(std::string* output) {
301 // TODO(tc): Do we want to prune webkit preferences that match the default 302 // TODO(tc): Do we want to prune webkit preferences that match the default
302 // value? 303 // value?
303 JSONStringValueSerializer serializer(output); 304 JSONStringValueSerializer serializer(output);
304 serializer.set_pretty_print(true); 305 serializer.set_pretty_print(true);
305 scoped_ptr<DictionaryValue> copy(prefs_->DeepCopyWithoutEmptyChildren()); 306 scoped_ptr<DictionaryValue> copy(prefs_->DeepCopyWithoutEmptyChildren());
306 return serializer.Serialize(*(copy.get())); 307 return serializer.Serialize(*(copy.get()));
307 } 308 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_unpacker.cc ('k') | chrome/common/json_schema_validator_unittest_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698