Add OS_IOS defines for the mobile promo.
[chromium-blink-merge.git] / base / supports_user_data.cc
blob4fe64bdf7b4f59bb5f5c7eedf08728c5552275b9
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/supports_user_data.h"
7 namespace base {
9 SupportsUserData::SupportsUserData() {}
11 SupportsUserData::Data* SupportsUserData::GetUserData(const void* key) const {
12 DataMap::const_iterator found = user_data_.find(key);
13 if (found != user_data_.end())
14 return found->second.get();
15 return NULL;
18 void SupportsUserData::SetUserData(const void* key, Data* data) {
19 user_data_[key] = linked_ptr<Data>(data);
22 SupportsUserData::~SupportsUserData() {}
24 } // namespace base