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

Side by Side Diff: cc/base/scoped_ptr_hash_map.h

Issue 12472028: Part 1 of cc/ directory shuffles: base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_SCOPED_PTR_HASH_MAP_H_ 5 #ifndef CC_BASE_SCOPED_PTR_HASH_MAP_H_
6 #define CC_SCOPED_PTR_HASH_MAP_H_ 6 #define CC_BASE_SCOPED_PTR_HASH_MAP_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/hash_tables.h" 9 #include "base/hash_tables.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/memory/scoped_ptr.h"
11 #include "base/stl_util.h" 12 #include "base/stl_util.h"
12 #include "base/memory/scoped_ptr.h"
13 13
14 namespace cc { 14 namespace cc {
15 15
16 // This type acts like a hash_map<K, scoped_ptr<V> >, based on top of 16 // This type acts like a hash_map<K, scoped_ptr<V> >, based on top of
17 // std::hash_map. The ScopedPtrHashMap has ownership of all values in the data 17 // std::hash_map. The ScopedPtrHashMap has ownership of all values in the data
18 // structure. 18 // structure.
19 template <typename Key, typename Value> 19 template <typename Key, typename Value>
20 class ScopedPtrHashMap { 20 class ScopedPtrHashMap {
21 typedef base::hash_map<Key, Value*> Container; 21 typedef base::hash_map<Key, Value*> Container;
22 public: 22 public:
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 inline const_iterator end() const { return data_.end(); } 143 inline const_iterator end() const { return data_.end(); }
144 144
145 private: 145 private:
146 Container data_; 146 Container data_;
147 147
148 DISALLOW_COPY_AND_ASSIGN(ScopedPtrHashMap); 148 DISALLOW_COPY_AND_ASSIGN(ScopedPtrHashMap);
149 }; 149 };
150 150
151 } // namespace cc 151 } // namespace cc
152 152
153 #endif // CC_SCOPED_PTR_HASH_MAP_H_ 153 #endif // CC_BASE_SCOPED_PTR_HASH_MAP_H_
OLDNEW
« no previous file with comments | « cc/base/scoped_ptr_deque.h ('k') | cc/base/scoped_ptr_vector.h » ('j') | cc/cc.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698