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

Side by Side Diff: base/sequenced_task_runner.h

Issue 9997007: Objects that derive from RefCounted/RefCountedThreadSafe should not have public dtors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: virtual & DISALLOW Created 8 years, 8 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_pump_mac.mm ('k') | base/single_thread_task_runner.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_SEQUENCED_TASKRUNNER_H_ 5 #ifndef BASE_SEQUENCED_TASKRUNNER_H_
6 #define BASE_SEQUENCED_TASKRUNNER_H_ 6 #define BASE_SEQUENCED_TASKRUNNER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/base_export.h" 9 #include "base/base_export.h"
10 #include "base/sequenced_task_runner_helpers.h" 10 #include "base/sequenced_task_runner_helpers.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // true if the object may be released at some point in the future, 136 // true if the object may be released at some point in the future,
137 // and false if the object definitely will not be released. 137 // and false if the object definitely will not be released.
138 template <class T> 138 template <class T>
139 bool ReleaseSoon(const tracked_objects::Location& from_here, 139 bool ReleaseSoon(const tracked_objects::Location& from_here,
140 T* object) { 140 T* object) {
141 return 141 return
142 subtle::ReleaseHelperInternal<T, bool>::ReleaseViaSequencedTaskRunner( 142 subtle::ReleaseHelperInternal<T, bool>::ReleaseViaSequencedTaskRunner(
143 this, from_here, object); 143 this, from_here, object);
144 } 144 }
145 145
146 private: 146 protected:
147 virtual ~SequencedTaskRunner() {}
148
149 private:
147 template <class T, class R> friend class subtle::DeleteHelperInternal; 150 template <class T, class R> friend class subtle::DeleteHelperInternal;
148 template <class T, class R> friend class subtle::ReleaseHelperInternal; 151 template <class T, class R> friend class subtle::ReleaseHelperInternal;
149 152
150 bool DeleteSoonInternal(const tracked_objects::Location& from_here, 153 bool DeleteSoonInternal(const tracked_objects::Location& from_here,
151 void(*deleter)(const void*), 154 void(*deleter)(const void*),
152 const void* object); 155 const void* object);
153 156
154 bool ReleaseSoonInternal(const tracked_objects::Location& from_here, 157 bool ReleaseSoonInternal(const tracked_objects::Location& from_here,
155 void(*releaser)(const void*), 158 void(*releaser)(const void*),
156 const void* object); 159 const void* object);
157 }; 160 };
158 161
159 } // namespace base 162 } // namespace base
160 163
161 #endif // BASE_SEQUENCED_TASKRUNNER_H_ 164 #endif // BASE_SEQUENCED_TASKRUNNER_H_
OLDNEW
« no previous file with comments | « base/message_pump_mac.mm ('k') | base/single_thread_task_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698