diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-12 09:04:38 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-12 09:04:38 +0000 |
commit | 35552dc595f511b2771410a3bd484b86bf03e84d (patch) | |
tree | 3ca3959b56eb468cae33022978aac7ca0b2c8c7c /base | |
parent | f5a376ac047c5b0d89fd1d09ef27c34b205f015c (diff) | |
download | chromium_src-35552dc595f511b2771410a3bd484b86bf03e84d.zip chromium_src-35552dc595f511b2771410a3bd484b86bf03e84d.tar.gz chromium_src-35552dc595f511b2771410a3bd484b86bf03e84d.tar.bz2 |
Explicitly ShutdownOnUIThread the HostContentSettingsMap when destroying the Profile.
Also, get rid of Profile dependencies while we're at it.
BUG=88037,88557
Review URL: http://codereview.chromium.org/7218073
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92128 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/values.cc | 10 | ||||
-rw-r--r-- | base/values.h | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/base/values.cc b/base/values.cc index 0f30e379..adfc9a8 100644 --- a/base/values.cc +++ b/base/values.cc @@ -123,6 +123,10 @@ bool Value::GetAsList(ListValue** out_value) { return false; } +bool Value::GetAsList(const ListValue** out_value) const { + return false; +} + Value* Value::DeepCopy() const { // This method should only be getting called for null Values--all subclasses // need to provide their own implementation;. @@ -866,6 +870,12 @@ bool ListValue::GetAsList(ListValue** out_value) { return true; } +bool ListValue::GetAsList(const ListValue** out_value) const { + if (out_value) + *out_value = this; + return true; +} + ListValue* ListValue::DeepCopy() const { ListValue* result = new ListValue; diff --git a/base/values.h b/base/values.h index 43894d1..a00a17c 100644 --- a/base/values.h +++ b/base/values.h @@ -94,6 +94,7 @@ class BASE_API Value { virtual bool GetAsString(std::string* out_value) const; virtual bool GetAsString(string16* out_value) const; virtual bool GetAsList(ListValue** out_value); + virtual bool GetAsList(const ListValue** out_value) const; // This creates a deep copy of the entire Value tree, and returns a pointer // to the copy. The caller gets ownership of the copy, of course. @@ -427,6 +428,7 @@ class BASE_API ListValue : public Value { // Overridden from Value: virtual bool GetAsList(ListValue** out_value); + virtual bool GetAsList(const ListValue** out_value) const; virtual ListValue* DeepCopy() const; virtual bool Equals(const Value* other) const; |