summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorbattre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-11 12:05:56 +0000
committerbattre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-11 12:05:56 +0000
commit377f253295342d2f2b6e28039608655912a2990c (patch)
tree15049dabb1bef3ffa8f4ab534d5afbe653ce7605 /base
parent2a88e4292e47835ef042cde4418890844665bb1a (diff)
downloadchromium_src-377f253295342d2f2b6e28039608655912a2990c.zip
chromium_src-377f253295342d2f2b6e28039608655912a2990c.tar.gz
chromium_src-377f253295342d2f2b6e28039608655912a2990c.tar.bz2
Fix memory leak in PrefMetricsService
BUG=266569 TBR=markusheintz@chromium.org Review URL: https://codereview.chromium.org/23903040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222500 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/values.cc2
-rw-r--r--base/values.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/base/values.cc b/base/values.cc
index 76e73a0..2d3984e 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -755,7 +755,7 @@ bool DictionaryValue::RemoveWithoutPathExpansion(const std::string& key,
return true;
}
-DictionaryValue* DictionaryValue::DeepCopyWithoutEmptyChildren() {
+DictionaryValue* DictionaryValue::DeepCopyWithoutEmptyChildren() const {
Value* copy = CopyWithoutEmptyChildren(this);
return copy ? static_cast<DictionaryValue*>(copy) : new DictionaryValue;
}
diff --git a/base/values.h b/base/values.h
index 495d1fa..3bc1f8b 100644
--- a/base/values.h
+++ b/base/values.h
@@ -326,7 +326,7 @@ class BASE_EXPORT DictionaryValue : public Value {
// Makes a copy of |this| but doesn't include empty dictionaries and lists in
// the copy. This never returns NULL, even if |this| itself is empty.
- DictionaryValue* DeepCopyWithoutEmptyChildren();
+ DictionaryValue* DeepCopyWithoutEmptyChildren() const;
// Merge |dictionary| into this dictionary. This is done recursively, i.e. any
// sub-dictionaries will be merged as well. In case of key collisions, the