summaryrefslogtreecommitdiffstats
path: root/chrome/common/property_bag.cc
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-12 20:16:50 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-12 20:16:50 +0000
commit76960a40e09420ac2e302f4b307c4dd0d8a61ce8 (patch)
tree8f6a5642af430f77528fd479eba63dfae42169d8 /chrome/common/property_bag.cc
parent45cbfb0444d2ae27d9dbc9880c547c0d42978782 (diff)
downloadchromium_src-76960a40e09420ac2e302f4b307c4dd0d8a61ce8.zip
chromium_src-76960a40e09420ac2e302f4b307c4dd0d8a61ce8.tar.gz
chromium_src-76960a40e09420ac2e302f4b307c4dd0d8a61ce8.tar.bz2
Add PropertyBag to TabContents. Convert the autocomplete state as a proof of concept. Add necessary const accessors to property bag.
BUG=5260 Review URL: http://codereview.chromium.org/13707 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6920 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/property_bag.cc')
-rw-r--r--chrome/common/property_bag.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/common/property_bag.cc b/chrome/common/property_bag.cc
index f7c92a3..dc25961 100644
--- a/chrome/common/property_bag.cc
+++ b/chrome/common/property_bag.cc
@@ -35,6 +35,13 @@ PropertyBag::Prop* PropertyBag::GetProperty(PropID id) {
return found->second.get();
}
+const PropertyBag::Prop* PropertyBag::GetProperty(PropID id) const {
+ PropertyMap::const_iterator found = props_.find(id);
+ if (found == props_.end())
+ return NULL;
+ return found->second.get();
+}
+
void PropertyBag::DeleteProperty(PropID id) {
PropertyMap::iterator found = props_.find(id);
if (found == props_.end())