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

Side by Side Diff: base/memory/ref_counted_delete_on_message_loop.h

Issue 17948002: Update Linux to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 | « apps/shortcut_manager.cc ('k') | cc/layers/texture_layer.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_MEMORY_REF_COUNTED_DELETE_ON_MESSAGE_LOOP_H_ 5 #ifndef BASE_MEMORY_REF_COUNTED_DELETE_ON_MESSAGE_LOOP_H_
6 #define BASE_MEMORY_REF_COUNTED_DELETE_ON_MESSAGE_LOOP_H_ 6 #define BASE_MEMORY_REF_COUNTED_DELETE_ON_MESSAGE_LOOP_H_
7 7
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 17 matching lines...) Expand all
28 // friend class DeleteHelper<Foo>; 28 // friend class DeleteHelper<Foo>;
29 // 29 //
30 // ~Foo(); 30 // ~Foo();
31 // }; 31 // };
32 32
33 template <class T> 33 template <class T>
34 class RefCountedDeleteOnMessageLoop : public subtle::RefCountedThreadSafeBase { 34 class RefCountedDeleteOnMessageLoop : public subtle::RefCountedThreadSafeBase {
35 public: 35 public:
36 RefCountedDeleteOnMessageLoop( 36 RefCountedDeleteOnMessageLoop(
37 const scoped_refptr<MessageLoopProxy>& proxy) : proxy_(proxy) { 37 const scoped_refptr<MessageLoopProxy>& proxy) : proxy_(proxy) {
38 DCHECK(proxy_); 38 DCHECK(proxy_.get());
39 } 39 }
40 40
41 void AddRef() const { 41 void AddRef() const {
42 subtle::RefCountedThreadSafeBase::AddRef(); 42 subtle::RefCountedThreadSafeBase::AddRef();
43 } 43 }
44 44
45 void Release() const { 45 void Release() const {
46 if (subtle::RefCountedThreadSafeBase::Release()) 46 if (subtle::RefCountedThreadSafeBase::Release())
47 DestructOnMessageLoop(); 47 DestructOnMessageLoop();
48 } 48 }
(...skipping 12 matching lines...) Expand all
61 61
62 scoped_refptr<MessageLoopProxy> proxy_; 62 scoped_refptr<MessageLoopProxy> proxy_;
63 63
64 private: 64 private:
65 DISALLOW_COPY_AND_ASSIGN(RefCountedDeleteOnMessageLoop); 65 DISALLOW_COPY_AND_ASSIGN(RefCountedDeleteOnMessageLoop);
66 }; 66 };
67 67
68 } // namespace base 68 } // namespace base
69 69
70 #endif // BASE_MEMORY_REF_COUNTED_DELETE_ON_MESSAGE_LOOP_H_ 70 #endif // BASE_MEMORY_REF_COUNTED_DELETE_ON_MESSAGE_LOOP_H_
OLDNEW
« no previous file with comments | « apps/shortcut_manager.cc ('k') | cc/layers/texture_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698