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

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: for comments in #1 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
« no previous file with comments | « chrome/browser/ui/views/ash/launcher/chrome_launcher_delegate.cc ('k') | chrome/common/json_pref_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..21198cc1ac6699d86d4566e8792ad8cddb538f62 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_need_empty_value_;
+
DISALLOW_COPY_AND_ASSIGN(JsonPrefStore);
};
« no previous file with comments | « chrome/browser/ui/views/ash/launcher/chrome_launcher_delegate.cc ('k') | chrome/common/json_pref_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698