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

Side by Side Diff: base/sequenced_task_runner_helpers.h

Issue 562493004: Clean up investigation code in DeleteHelper::DoDelete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | 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_TASK_RUNNER_HELPERS_H_ 5 #ifndef BASE_SEQUENCED_TASK_RUNNER_HELPERS_H_
6 #define BASE_SEQUENCED_TASK_RUNNER_HELPERS_H_ 6 #define BASE_SEQUENCED_TASK_RUNNER_HELPERS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/debug/alias.h" 9 #include "base/debug/alias.h"
10 10
(...skipping 19 matching lines...) Expand all
30 // We use this trick so we don't need to include bind.h in a header 30 // We use this trick so we don't need to include bind.h in a header
31 // file like sequenced_task_runner.h. We also wrap the helpers in a 31 // file like sequenced_task_runner.h. We also wrap the helpers in a
32 // templated class to make it easier for users of DeleteSoon to 32 // templated class to make it easier for users of DeleteSoon to
33 // declare the helper as a friend. 33 // declare the helper as a friend.
34 template <class T> 34 template <class T>
35 class DeleteHelper { 35 class DeleteHelper {
36 private: 36 private:
37 template <class T2, class R> friend class subtle::DeleteHelperInternal; 37 template <class T2, class R> friend class subtle::DeleteHelperInternal;
38 38
39 static void DoDelete(const void* object) { 39 static void DoDelete(const void* object) {
40 // TODO(tzik): Remove this after http://crbug.com/393634 is fixed.
41 const char* function_name = __FUNCTION__;
42 debug::Alias(&function_name);
43
44 delete reinterpret_cast<const T*>(object); 40 delete reinterpret_cast<const T*>(object);
45 } 41 }
46 42
47 DISALLOW_COPY_AND_ASSIGN(DeleteHelper); 43 DISALLOW_COPY_AND_ASSIGN(DeleteHelper);
48 }; 44 };
49 45
50 template <class T> 46 template <class T>
51 class ReleaseHelper { 47 class ReleaseHelper {
52 private: 48 private:
53 template <class T2, class R> friend class subtle::ReleaseHelperInternal; 49 template <class T2, class R> friend class subtle::ReleaseHelperInternal;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 104
109 private: 105 private:
110 DISALLOW_COPY_AND_ASSIGN(ReleaseHelperInternal); 106 DISALLOW_COPY_AND_ASSIGN(ReleaseHelperInternal);
111 }; 107 };
112 108
113 } // namespace subtle 109 } // namespace subtle
114 110
115 } // namespace base 111 } // namespace base
116 112
117 #endif // BASE_SEQUENCED_TASK_RUNNER_HELPERS_H_ 113 #endif // BASE_SEQUENCED_TASK_RUNNER_HELPERS_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698