diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-06 18:13:43 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-06 18:13:43 +0000 |
commit | 73c479313b0abb39ab8ecf5fa8f3026449d6c04c (patch) | |
tree | 768bc2e495b798cfca857cee75ac882b4a261009 /base/values.cc | |
parent | 8f55e8087439851d78245881a8acd62b24251801 (diff) | |
download | chromium_src-73c479313b0abb39ab8ecf5fa8f3026449d6c04c.zip chromium_src-73c479313b0abb39ab8ecf5fa8f3026449d6c04c.tar.gz chromium_src-73c479313b0abb39ab8ecf5fa8f3026449d6c04c.tar.bz2 |
Fix for Bug 50726 "Save extension list and "winning" prefs from extensions"
This is a redesign for http://codereview.chromium.org/4852002/ following discussions.
The goal of this patch is to ensure that Chrome maintains the order in which extensions apply their preferences between restarts. This may be an issue if two extensions overwrite each others preferences. Furthermore, it ensures that preferences are persisted to disk between browser restarts. Therefore, previous settings are immediately available when the browser is restarted.
A description of the design has been published https://docs.google.com/a/google.com/document/d/1E_HX_cUpET1gH2gDunGIU1EOywMM6FEOuVU6TlpnSwo/edit?hl=en for review and comments. - Sorry, accessible Google internally only.
This CL requires http://codereview.chromium.org/5204006/
Contributed by battre@google.com
BUG=50726
TEST=none
Review URL: http://codereview.chromium.org/5213002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68355 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/values.cc')
-rw-r--r-- | base/values.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/base/values.cc b/base/values.cc index cd0f6a8..c6a377f 100644 --- a/base/values.cc +++ b/base/values.cc @@ -133,6 +133,13 @@ bool Value::Equals(const Value* other) const { return other->IsType(TYPE_NULL); } +// static +bool Value::Equals(const Value* a, const Value* b) { + if ((a == NULL) && (b == NULL)) return true; + if ((a == NULL) ^ (b == NULL)) return false; + return a->Equals(b); +} + Value::Value(ValueType type) : type_(type) { } |