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

Unified Diff: chrome/common/json_pref_store.cc

Issue 10377083: Don't mark JsonPrefStore as initialized in case of fatal failure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove NULL-check, defer initialized flag in JsonPrefStore. Created 8 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/json_pref_store.cc
diff --git a/chrome/common/json_pref_store.cc b/chrome/common/json_pref_store.cc
index 65f4e107ddd889cc51f42c04a6e4884939459e95..ed30346ff048190d9ad004b210f14be3ffca8cf7 100644
--- a/chrome/common/json_pref_store.cc
+++ b/chrome/common/json_pref_store.cc
@@ -264,7 +264,6 @@ void JsonPrefStore::OnFileRead(Value* value_owned,
PersistentPrefStore::PrefReadError error,
bool no_dir) {
scoped_ptr<Value> value(value_owned);
- initialized_ = true;
read_error_ = error;
if (no_dir) {
@@ -274,6 +273,8 @@ void JsonPrefStore::OnFileRead(Value* value_owned,
return;
}
+ initialized_ = true;
Mattias Nissler (ping if slow) 2012/05/10 15:44:04 Good catch.
+
switch (error) {
case PREF_READ_ERROR_ACCESS_DENIED:
case PREF_READ_ERROR_FILE_OTHER:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698