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

Side by Side Diff: chrome/common/ref_counted_util.h

Issue 1548153002: Switch to standard integer types in chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
« no previous file with comments | « chrome/common/profiling.cc ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_COMMON_REF_COUNTED_UTIL_H__ 5 #ifndef CHROME_COMMON_REF_COUNTED_UTIL_H__
6 #define CHROME_COMMON_REF_COUNTED_UTIL_H__ 6 #define CHROME_COMMON_REF_COUNTED_UTIL_H__
7 7
8 #include <vector>
9
10 #include "base/macros.h"
8 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
9 #include <vector>
10 12
11 // RefCountedVector is just a vector wrapped up with 13 // RefCountedVector is just a vector wrapped up with
12 // RefCountedThreadSafe. 14 // RefCountedThreadSafe.
13 template<class T> 15 template<class T>
14 class RefCountedVector 16 class RefCountedVector
15 : public base::RefCountedThreadSafe<RefCountedVector<T> > { 17 : public base::RefCountedThreadSafe<RefCountedVector<T> > {
16 public: 18 public:
17 RefCountedVector() {} 19 RefCountedVector() {}
18 explicit RefCountedVector(const std::vector<T>& initializer) 20 explicit RefCountedVector(const std::vector<T>& initializer)
19 : data(initializer) {} 21 : data(initializer) {}
20 22
21 std::vector<T> data; 23 std::vector<T> data;
22 24
23 private: 25 private:
24 friend class base::RefCountedThreadSafe<RefCountedVector<T>>; 26 friend class base::RefCountedThreadSafe<RefCountedVector<T>>;
25 ~RefCountedVector() {} 27 ~RefCountedVector() {}
26 28
27 DISALLOW_COPY_AND_ASSIGN(RefCountedVector<T>); 29 DISALLOW_COPY_AND_ASSIGN(RefCountedVector<T>);
28 }; 30 };
29 31
30 #endif // CHROME_COMMON_REF_COUNTED_UTIL_H__ 32 #endif // CHROME_COMMON_REF_COUNTED_UTIL_H__
OLDNEW
« no previous file with comments | « chrome/common/profiling.cc ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698