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

Unified Diff: webkit/quota/quota_task.h

Issue 10416004: RefCounted types should not have public destructors, webkit/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to r140259 Created 8 years, 7 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 | « webkit/quota/quota_manager.h ('k') | webkit/quota/quota_temporary_storage_evictor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/quota/quota_task.h
diff --git a/webkit/quota/quota_task.h b/webkit/quota/quota_task.h
index ae9b2f1a76d30d0ca641c30326a3df89d9432d19..6ade8306ef6e1b918bd3d838fccc8a4e45fad314 100644
--- a/webkit/quota/quota_task.h
+++ b/webkit/quota/quota_task.h
@@ -11,6 +11,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
+#include "base/sequenced_task_runner_helpers.h"
namespace base {
class SingleThreadTaskRunner;
@@ -26,11 +27,11 @@ class QuotaThreadTask;
// TODO(kinuko): Revise this using base::Callback.
class QuotaTask {
public:
- virtual ~QuotaTask();
void Start();
protected:
explicit QuotaTask(QuotaTaskObserver* observer);
+ virtual ~QuotaTask();
// The task body.
virtual void Run() = 0;
@@ -52,8 +53,10 @@ class QuotaTask {
}
private:
+ friend class base::DeleteHelper<QuotaTask>;
friend class QuotaTaskObserver;
friend class QuotaThreadTask;
+
void Abort();
QuotaTaskObserver* observer_;
scoped_refptr<base::SingleThreadTaskRunner> original_task_runner_;
@@ -96,14 +99,13 @@ class QuotaThreadTask : public QuotaTask,
};
class QuotaTaskObserver {
- public:
- virtual ~QuotaTaskObserver();
-
protected:
friend class QuotaTask;
friend class QuotaThreadTask;
QuotaTaskObserver();
+ virtual ~QuotaTaskObserver();
+
void RegisterTask(QuotaTask* task);
void UnregisterTask(QuotaTask* task);
« no previous file with comments | « webkit/quota/quota_manager.h ('k') | webkit/quota/quota_temporary_storage_evictor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698