summaryrefslogtreecommitdiffstats
path: root/chrome/common/json_pref_store.cc
diff options
context:
space:
mode:
authorbattre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-14 19:22:29 +0000
committerbattre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-14 19:22:29 +0000
commita78e948d0165924e55d35f3c8a01e3b387df4d6e (patch)
tree8801ee7a17626a6598ae16b130f0136b84f137b1 /chrome/common/json_pref_store.cc
parent3cfade1e6853ab12c5c13c4d783717df32fce5a4 (diff)
downloadchromium_src-a78e948d0165924e55d35f3c8a01e3b387df4d6e.zip
chromium_src-a78e948d0165924e55d35f3c8a01e3b387df4d6e.tar.gz
chromium_src-a78e948d0165924e55d35f3c8a01e3b387df4d6e.tar.bz2
Fixed regression: various preferences were not persisted when changed from incognito window
This CL renames the OverlayPrefStore to an IncognitoPrefStore. This IncognitoPrefStore stores write operations in memory and prevents persisting them to the user prefs file. The CL also blacklists two preferences from being stored in the in-memory IncognitoPrefStore to fix the regressions mentioned in the bugs. BUG=87191,84472 TEST=see bug descriptions Review URL: http://codereview.chromium.org/7342043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92581 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/json_pref_store.cc')
-rw-r--r--chrome/common/json_pref_store.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/common/json_pref_store.cc b/chrome/common/json_pref_store.cc
index 5891633..5dd3cf2 100644
--- a/chrome/common/json_pref_store.cc
+++ b/chrome/common/json_pref_store.cc
@@ -155,7 +155,8 @@ PrefStore::ReadResult JsonPrefStore::GetValue(const std::string& key,
const Value** result) const {
Value* tmp = NULL;
if (prefs_->Get(key, &tmp)) {
- *result = tmp;
+ if (result)
+ *result = tmp;
return READ_OK;
}
return READ_NO_VALUE;