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

Unified Diff: webkit/quota/quota_task.h

Issue 10197007: Change webkit/{fileapi,quota} code to use TaskRunner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test fix 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.cc ('k') | webkit/quota/quota_task.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 dbd5ca04fcf022edf25a3dc46931c010276b89cc..ae9b2f1a76d30d0ca641c30326a3df89d9432d19 100644
--- a/webkit/quota/quota_task.h
+++ b/webkit/quota/quota_task.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,17 +11,19 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
-#include "base/message_loop_proxy.h"
namespace base {
-class MessageLoopProxy;
+class SingleThreadTaskRunner;
+class TaskRunner;
}
namespace quota {
class QuotaTaskObserver;
+class QuotaThreadTask;
// A base class for quota tasks.
+// TODO(kinuko): Revise this using base::Callback.
class QuotaTask {
public:
virtual ~QuotaTask();
@@ -45,15 +47,16 @@ class QuotaTask {
void DeleteSoon();
QuotaTaskObserver* observer() const { return observer_; }
- scoped_refptr<base::MessageLoopProxy> original_message_loop() const {
- return original_message_loop_;
+ base::SingleThreadTaskRunner* original_task_runner() const {
+ return original_task_runner_;
}
private:
friend class QuotaTaskObserver;
+ friend class QuotaThreadTask;
void Abort();
QuotaTaskObserver* observer_;
- scoped_refptr<base::MessageLoopProxy> original_message_loop_;
+ scoped_refptr<base::SingleThreadTaskRunner> original_task_runner_;
};
// For tasks that post tasks to the other thread.
@@ -61,7 +64,7 @@ class QuotaThreadTask : public QuotaTask,
public base::RefCountedThreadSafe<QuotaThreadTask> {
public:
QuotaThreadTask(QuotaTaskObserver* observer,
- scoped_refptr<base::MessageLoopProxy> target_message_loop);
+ base::TaskRunner* target_task_runner);
protected:
virtual ~QuotaThreadTask();
@@ -80,8 +83,8 @@ class QuotaThreadTask : public QuotaTask,
virtual bool RunOnTargetThreadAsync();
virtual void Run() OVERRIDE;
- scoped_refptr<base::MessageLoopProxy> target_message_loop() const {
- return target_message_loop_;
+ base::TaskRunner* target_task_runner() const {
+ return target_task_runner_;
}
private:
@@ -89,7 +92,7 @@ class QuotaThreadTask : public QuotaTask,
friend class QuotaTaskObserver;
void CallRunOnTargetThread();
- scoped_refptr<base::MessageLoopProxy> target_message_loop_;
+ scoped_refptr<base::TaskRunner> target_task_runner_;
};
class QuotaTaskObserver {
« no previous file with comments | « webkit/quota/quota_manager.cc ('k') | webkit/quota/quota_task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698