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

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

Issue 8368018: Convert chrome/common non-debug logs to debug logs. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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
« no previous file with comments | « chrome/common/important_file_writer.cc ('k') | chrome/common/json_schema_validator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 // static 90 // static
91 void FileThreadDeserializer::HandleErrors( 91 void FileThreadDeserializer::HandleErrors(
92 const Value* value, 92 const Value* value,
93 const FilePath& path, 93 const FilePath& path,
94 int error_code, 94 int error_code,
95 const std::string& error_msg, 95 const std::string& error_msg,
96 PersistentPrefStore::PrefReadError* error) { 96 PersistentPrefStore::PrefReadError* error) {
97 *error = PersistentPrefStore::PREF_READ_ERROR_NONE; 97 *error = PersistentPrefStore::PREF_READ_ERROR_NONE;
98 if (!value) { 98 if (!value) {
99 VLOG(1) << "Error while loading JSON file: " << error_msg; 99 DVLOG(1) << "Error while loading JSON file: " << error_msg;
100 switch (error_code) { 100 switch (error_code) {
101 case JSONFileValueSerializer::JSON_ACCESS_DENIED: 101 case JSONFileValueSerializer::JSON_ACCESS_DENIED:
102 *error = PersistentPrefStore::PREF_READ_ERROR_ACCESS_DENIED; 102 *error = PersistentPrefStore::PREF_READ_ERROR_ACCESS_DENIED;
103 break; 103 break;
104 case JSONFileValueSerializer::JSON_CANNOT_READ_FILE: 104 case JSONFileValueSerializer::JSON_CANNOT_READ_FILE:
105 *error = PersistentPrefStore::PREF_READ_ERROR_FILE_OTHER; 105 *error = PersistentPrefStore::PREF_READ_ERROR_FILE_OTHER;
106 break; 106 break;
107 case JSONFileValueSerializer::JSON_FILE_LOCKED: 107 case JSONFileValueSerializer::JSON_FILE_LOCKED:
108 *error = PersistentPrefStore::PREF_READ_ERROR_FILE_LOCKED; 108 *error = PersistentPrefStore::PREF_READ_ERROR_FILE_LOCKED;
109 break; 109 break;
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 } 314 }
315 315
316 bool JsonPrefStore::SerializeData(std::string* output) { 316 bool JsonPrefStore::SerializeData(std::string* output) {
317 // TODO(tc): Do we want to prune webkit preferences that match the default 317 // TODO(tc): Do we want to prune webkit preferences that match the default
318 // value? 318 // value?
319 JSONStringValueSerializer serializer(output); 319 JSONStringValueSerializer serializer(output);
320 serializer.set_pretty_print(true); 320 serializer.set_pretty_print(true);
321 scoped_ptr<DictionaryValue> copy(prefs_->DeepCopyWithoutEmptyChildren()); 321 scoped_ptr<DictionaryValue> copy(prefs_->DeepCopyWithoutEmptyChildren());
322 return serializer.Serialize(*(copy.get())); 322 return serializer.Serialize(*(copy.get()));
323 } 323 }
OLDNEW
« no previous file with comments | « chrome/common/important_file_writer.cc ('k') | chrome/common/json_schema_validator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698