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

Side by Side Diff: base/message_loop_proxy.h

Issue 3971004: Revert "Revert "Const-ify RefCountedThreadSafe::AddRef and Release."" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 2 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/message_loop.h ('k') | base/message_loop_proxy.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_MESSAGE_LOOP_PROXY_H_ 5 #ifndef BASE_MESSAGE_LOOP_PROXY_H_
6 #define BASE_MESSAGE_LOOP_PROXY_H_ 6 #define BASE_MESSAGE_LOOP_PROXY_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/ref_counted.h" 10 #include "base/ref_counted.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 static scoped_refptr<MessageLoopProxy> CreateForCurrentThread(); 57 static scoped_refptr<MessageLoopProxy> CreateForCurrentThread();
58 58
59 protected: 59 protected:
60 friend struct MessageLoopProxyTraits; 60 friend struct MessageLoopProxyTraits;
61 61
62 MessageLoopProxy(); 62 MessageLoopProxy();
63 virtual ~MessageLoopProxy(); 63 virtual ~MessageLoopProxy();
64 64
65 // Called when the proxy is about to be deleted. Subclasses can override this 65 // Called when the proxy is about to be deleted. Subclasses can override this
66 // to provide deletion on specific threads. 66 // to provide deletion on specific threads.
67 virtual void OnDestruct(); 67 virtual void OnDestruct() const;
68 }; 68 };
69 69
70 struct MessageLoopProxyTraits { 70 struct MessageLoopProxyTraits {
71 static void Destruct(MessageLoopProxy* proxy) { 71 static void Destruct(const MessageLoopProxy* proxy) {
72 proxy->OnDestruct(); 72 proxy->OnDestruct();
73 } 73 }
74 }; 74 };
75 75
76 } // namespace base 76 } // namespace base
77 77
78 #endif // BASE_MESSAGE_LOOP_PROXY_H_ 78 #endif // BASE_MESSAGE_LOOP_PROXY_H_
OLDNEW
« no previous file with comments | « base/message_loop.h ('k') | base/message_loop_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698