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

Unified Diff: base/task.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/ref_counted.h ('k') | chrome/browser/browser_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task.h
diff --git a/base/task.h b/base/task.h
index e6ac33c6f27a81f40e47fdbe11ad8e264ed8f544..28d15fcadf551e96e9aaa9f69a2b26551c9c3ba5 100644
--- a/base/task.h
+++ b/base/task.h
@@ -180,7 +180,7 @@ class ScopedRunnableMethodFactory {
template<class T>
class DeleteTask : public CancelableTask {
public:
- explicit DeleteTask(T* obj) : obj_(obj) {
+ explicit DeleteTask(const T* obj) : obj_(obj) {
}
virtual void Run() {
delete obj_;
@@ -190,14 +190,14 @@ class DeleteTask : public CancelableTask {
}
private:
- T* obj_;
+ const T* obj_;
};
// Task to Release() an object
template<class T>
class ReleaseTask : public CancelableTask {
public:
- explicit ReleaseTask(T* obj) : obj_(obj) {
+ explicit ReleaseTask(const T* obj) : obj_(obj) {
}
virtual void Run() {
if (obj_)
@@ -208,7 +208,7 @@ class ReleaseTask : public CancelableTask {
}
private:
- T* obj_;
+ const T* obj_;
};
// RunnableMethodTraits --------------------------------------------------------
« no previous file with comments | « base/ref_counted.h ('k') | chrome/browser/browser_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698