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

Unified Diff: chrome/common/json_pref_store.h

Issue 10055003: Keep emtpy List/Dictionary pref value with non-empty default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
Index: chrome/common/json_pref_store.h
diff --git a/chrome/common/json_pref_store.h b/chrome/common/json_pref_store.h
index e9027510b59a431ec922a32bf4bb9cebc6e6f639..09acff894a0ee5866d20d0c08cb2a9ef65e41ddb 100644
--- a/chrome/common/json_pref_store.h
+++ b/chrome/common/json_pref_store.h
@@ -6,6 +6,7 @@
#define CHROME_COMMON_JSON_PREF_STORE_H_
#pragma once
+#include <set>
#include <string>
#include "base/basictypes.h"
@@ -49,6 +50,7 @@ class JsonPrefStore : public PersistentPrefStore,
virtual void SetValueSilently(const std::string& key,
base::Value* value) OVERRIDE;
virtual void RemoveValue(const std::string& key) OVERRIDE;
+ virtual void MarkNeedsEmptyValue(const std::string& key) OVERRIDE;
virtual bool ReadOnly() const OVERRIDE;
virtual PrefReadError GetReadError() const OVERRIDE;
virtual PrefReadError ReadPrefs() OVERRIDE;
@@ -83,6 +85,8 @@ class JsonPrefStore : public PersistentPrefStore,
bool initialized_;
PrefReadError read_error_;
+ std::set<std::string> keys_needs_empty_value_;
battre 2012/04/11 21:55:51 grammar: keys (plural) vs. needs (singular)
xiyuan 2012/04/11 22:36:46 Done.
+
DISALLOW_COPY_AND_ASSIGN(JsonPrefStore);
};

Powered by Google App Engine
This is Rietveld 408576698