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

Unified Diff: base/property_bag.cc

Issue 10831407: Kill PropertyBag, switch WebContents to SupportsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase only Created 8 years, 4 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 | « base/property_bag.h ('k') | base/property_bag_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/property_bag.cc
diff --git a/base/property_bag.cc b/base/property_bag.cc
deleted file mode 100644
index 9578e648302ed638b8c22d5136df62f10e163e46..0000000000000000000000000000000000000000
--- a/base/property_bag.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/property_bag.h"
-
-#include "base/memory/linked_ptr.h"
-
-namespace base {
-
-PropertyBag::PropertyBag() {
-}
-
-PropertyBag::PropertyBag(const PropertyBag& other) {
- operator=(other);
-}
-
-PropertyBag::~PropertyBag() {
-}
-
-PropertyBag& PropertyBag::operator=(const PropertyBag& other) {
- props_.clear();
-
- // We need to make copies of each property using the virtual copy() method.
- for (PropertyMap::const_iterator i = other.props_.begin();
- i != other.props_.end(); ++i)
- props_[i->first] = linked_ptr<Prop>(i->second->copy());
- return *this;
-}
-
-void PropertyBag::SetProperty(PropID id, Prop* prop) {
- props_[id] = linked_ptr<Prop>(prop);
-}
-
-PropertyBag::Prop* PropertyBag::GetProperty(PropID id) {
- PropertyMap::const_iterator found = props_.find(id);
- if (found == props_.end())
- return NULL;
- 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())
- return; // Not found, nothing to do.
- props_.erase(found);
-}
-
-PropertyAccessorBase::PropertyAccessorBase() {
- static PropertyBag::PropID next_id = 1;
- prop_id_ = next_id++;
-}
-
-} // namespace base
« no previous file with comments | « base/property_bag.h ('k') | base/property_bag_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698