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

Side by Side Diff: base/ref_counted.h

Issue 6028009: Move base/thread.h to base/threading, fix up callers to use the new location.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 11 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
« no previous file with comments | « base/process_util_posix.cc ('k') | base/ref_counted.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 BASE_REF_COUNTED_H_ 5 #ifndef BASE_REF_COUNTED_H_
6 #define BASE_REF_COUNTED_H_ 6 #define BASE_REF_COUNTED_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/atomic_ref_count.h" 9 #include "base/atomic_ref_count.h"
10 #include "base/thread_collision_warner.h" 10 #include "base/threading/thread_collision_warner.h"
11 11
12 namespace base { 12 namespace base {
13 13
14 namespace subtle { 14 namespace subtle {
15 15
16 class RefCountedBase { 16 class RefCountedBase {
17 public: 17 public:
18 static bool ImplementsThreadSafeReferenceCounting() { return false; } 18 static bool ImplementsThreadSafeReferenceCounting() { return false; }
19 19
20 bool HasOneRef() const { return ref_count_ == 1; } 20 bool HasOneRef() const { return ref_count_ == 1; }
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 }; 289 };
290 290
291 // Handy utility for creating a scoped_refptr<T> out of a T* explicitly without 291 // Handy utility for creating a scoped_refptr<T> out of a T* explicitly without
292 // having to retype all the template arguments 292 // having to retype all the template arguments
293 template <typename T> 293 template <typename T>
294 scoped_refptr<T> make_scoped_refptr(T* t) { 294 scoped_refptr<T> make_scoped_refptr(T* t) {
295 return scoped_refptr<T>(t); 295 return scoped_refptr<T>(t);
296 } 296 }
297 297
298 #endif // BASE_REF_COUNTED_H_ 298 #endif // BASE_REF_COUNTED_H_
OLDNEW
« no previous file with comments | « base/process_util_posix.cc ('k') | base/ref_counted.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698