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

Side by Side Diff: base/supports_user_data.cc

Issue 9348109: Add extra data to BrowserContext so that content layer and other embedders can stash data with it t… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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.
4
5 #include "base/supports_user_data.h"
6
7 namespace base {
8
9 SupportsUserData::SupportsUserData() {
10 }
11
12 SupportsUserData::~SupportsUserData() {
13 }
14
15 SupportsUserData::Data* SupportsUserData::GetUserData(const void* key) const {
16 DataMap::const_iterator found = user_data_.find(key);
17 if (found != user_data_.end())
18 return found->second.get();
19 return NULL;
20 }
21
22 void SupportsUserData::SetUserData(const void* key, Data* data) {
23 user_data_[key] = linked_ptr<Data>(data);
24 }
25
26 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698