summaryrefslogtreecommitdiffstats
path: root/chrome/common/ref_counted_util.h
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-08-06 12:13:06 +0100
committerBen Murdoch <benm@google.com>2010-08-18 15:49:13 +0100
commit06741cbc25cd4227a9fba40dfd0273bfcc1a587a (patch)
treeca6f21dec86a8c4f6d3c50e78628c0cf31da0353 /chrome/common/ref_counted_util.h
parentaa0bf16ed53445f227734aee4274c7aef056f032 (diff)
downloadexternal_chromium-06741cbc25cd4227a9fba40dfd0273bfcc1a587a.zip
external_chromium-06741cbc25cd4227a9fba40dfd0273bfcc1a587a.tar.gz
external_chromium-06741cbc25cd4227a9fba40dfd0273bfcc1a587a.tar.bz2
Add chrome/common @ 52593
Needed by autofill Change-Id: Ibfea9ab92382af0bd0cfc6e94d21e4baa4b9d896
Diffstat (limited to 'chrome/common/ref_counted_util.h')
-rw-r--r--chrome/common/ref_counted_util.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/chrome/common/ref_counted_util.h b/chrome/common/ref_counted_util.h
new file mode 100644
index 0000000..b04580e
--- /dev/null
+++ b/chrome/common/ref_counted_util.h
@@ -0,0 +1,26 @@
+// Copyright (c) 2006-2008 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.
+
+#ifndef CHROME_COMMON_REF_COUNTED_UTIL_H__
+#define CHROME_COMMON_REF_COUNTED_UTIL_H__
+
+#include "base/ref_counted.h"
+#include <vector>
+
+// RefCountedVector is just a vector wrapped up with
+// RefCountedThreadSafe.
+template<class T>
+class RefCountedVector
+ : public base::RefCountedThreadSafe<RefCountedVector<T> > {
+ public:
+ RefCountedVector() {}
+ explicit RefCountedVector(const std::vector<T>& initializer)
+ : data(initializer) {}
+
+ std::vector<T> data;
+
+ DISALLOW_COPY_AND_ASSIGN(RefCountedVector<T>);
+};
+
+#endif // CHROME_COMMON_REF_COUNTED_UTIL_H__