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

Unified Diff: webkit/fileapi/file_system_quota_client.cc

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, 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 side-by-side diff with in-line comments
Download patch
Index: webkit/fileapi/file_system_quota_client.cc
diff --git a/webkit/fileapi/file_system_quota_client.cc b/webkit/fileapi/file_system_quota_client.cc
index bb86fd99a2faf4df90f52bf3d1ceeb4beb3c2aa9..5a1faf4b90de7b42fc4e00b994ec66ec4cf68df2 100644
--- a/webkit/fileapi/file_system_quota_client.cc
+++ b/webkit/fileapi/file_system_quota_client.cc
@@ -11,7 +11,7 @@
#include "base/file_util.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
-#include "base/message_loop_proxy.h"
+#include "base/task_runner.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"
#include "webkit/fileapi/file_system_context.h"
@@ -19,7 +19,7 @@
#include "webkit/fileapi/file_system_usage_cache.h"
#include "webkit/fileapi/file_system_util.h"
-using base::MessageLoopProxy;
+using base::TaskRunner;
using quota::QuotaThreadTask;
using quota::StorageType;
@@ -29,10 +29,10 @@ class FileSystemQuotaClient::GetOriginUsageTask : public QuotaThreadTask {
public:
GetOriginUsageTask(
FileSystemQuotaClient* quota_client,
- scoped_refptr<MessageLoopProxy> file_message_loop,
+ TaskRunner* file_task_runner,
const GURL& origin_url,
FileSystemType type)
- : QuotaThreadTask(quota_client, file_message_loop),
+ : QuotaThreadTask(quota_client, file_task_runner),
quota_client_(quota_client),
origin_url_(origin_url),
type_(type),
@@ -65,9 +65,9 @@ class FileSystemQuotaClient::GetOriginsForTypeTask : public QuotaThreadTask {
public:
GetOriginsForTypeTask(
FileSystemQuotaClient* quota_client,
- scoped_refptr<MessageLoopProxy> file_message_loop,
+ TaskRunner* file_task_runner,
FileSystemType type)
- : QuotaThreadTask(quota_client, file_message_loop),
+ : QuotaThreadTask(quota_client, file_task_runner),
quota_client_(quota_client),
type_(type) {
DCHECK(quota_client_);
@@ -97,10 +97,10 @@ class FileSystemQuotaClient::GetOriginsForHostTask : public QuotaThreadTask {
public:
GetOriginsForHostTask(
FileSystemQuotaClient* quota_client,
- scoped_refptr<MessageLoopProxy> file_message_loop,
+ TaskRunner* file_task_runner,
FileSystemType type,
const std::string& host)
- : QuotaThreadTask(quota_client, file_message_loop),
+ : QuotaThreadTask(quota_client, file_task_runner),
quota_client_(quota_client),
type_(type),
host_(host) {
@@ -133,11 +133,11 @@ class FileSystemQuotaClient::DeleteOriginTask
public:
DeleteOriginTask(
FileSystemQuotaClient* quota_client,
- scoped_refptr<MessageLoopProxy> file_message_loop,
+ TaskRunner* file_task_runner,
const GURL& origin,
FileSystemType type,
const DeletionCallback& callback)
- : QuotaThreadTask(quota_client, file_message_loop),
+ : QuotaThreadTask(quota_client, file_task_runner),
file_system_context_(quota_client->file_system_context_),
origin_(origin),
type_(type),
@@ -167,13 +167,13 @@ class FileSystemQuotaClient::DeleteOriginTask
};
FileSystemQuotaClient::FileSystemQuotaClient(
- scoped_refptr<base::MessageLoopProxy> file_message_loop,
+ base::TaskRunner* file_task_runner,
FileSystemContext* file_system_context,
bool is_incognito)
- : file_message_loop_(file_message_loop),
+ : file_task_runner_(file_task_runner),
file_system_context_(file_system_context),
is_incognito_(is_incognito) {
- DCHECK(file_message_loop);
+ DCHECK(file_task_runner);
}
FileSystemQuotaClient::~FileSystemQuotaClient() {
@@ -205,7 +205,7 @@ void FileSystemQuotaClient::GetOriginUsage(
if (pending_usage_callbacks_.Add(
std::make_pair(type, origin_url.spec()), callback)) {
scoped_refptr<GetOriginUsageTask> task(
- new GetOriginUsageTask(this, file_message_loop_, origin_url, type));
+ new GetOriginUsageTask(this, file_task_runner_, origin_url, type));
task->Start();
}
}
@@ -227,7 +227,7 @@ void FileSystemQuotaClient::GetOriginsForType(
if (pending_origins_for_type_callbacks_.Add(type, callback)) {
scoped_refptr<GetOriginsForTypeTask> task(
- new GetOriginsForTypeTask(this, file_message_loop_, type));
+ new GetOriginsForTypeTask(this, file_task_runner_, type));
task->Start();
}
}
@@ -251,7 +251,7 @@ void FileSystemQuotaClient::GetOriginsForHost(
if (pending_origins_for_host_callbacks_.Add(
std::make_pair(type, host), callback)) {
scoped_refptr<GetOriginsForHostTask> task(
- new GetOriginsForHostTask(this, file_message_loop_,
+ new GetOriginsForHostTask(this, file_task_runner_,
type, host));
task->Start();
}
@@ -263,7 +263,7 @@ void FileSystemQuotaClient::DeleteOriginData(const GURL& origin,
FileSystemType fs_type = QuotaStorageTypeToFileSystemType(type);
DCHECK(fs_type != kFileSystemTypeUnknown);
scoped_refptr<DeleteOriginTask> task(
- new DeleteOriginTask(this, file_message_loop_,
+ new DeleteOriginTask(this, file_task_runner_,
origin, fs_type, callback));
task->Start();
}

Powered by Google App Engine
This is Rietveld 408576698