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

Unified Diff: webkit/fileapi/file_system_context.cc

Issue 10829147: Make MediaFileUtil run on thread pool. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix for windows Created 8 years, 4 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/fileapi/file_system_context.h ('k') | webkit/fileapi/file_system_dir_url_request_job_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/file_system_context.cc
diff --git a/webkit/fileapi/file_system_context.cc b/webkit/fileapi/file_system_context.cc
index 702dfc0c370f7b1bbaeaf96af7bee1a8b1b2e0b3..d76ad78acb1dd039a5ab6804e71b2523ce97a8d7 100644
--- a/webkit/fileapi/file_system_context.cc
+++ b/webkit/fileapi/file_system_context.cc
@@ -13,6 +13,7 @@
#include "webkit/fileapi/file_system_operation_interface.h"
#include "webkit/fileapi/file_system_options.h"
#include "webkit/fileapi/file_system_quota_client.h"
+#include "webkit/fileapi/file_system_task_runners.h"
#include "webkit/fileapi/file_system_url.h"
#include "webkit/fileapi/file_system_util.h"
#include "webkit/fileapi/isolated_mount_point_provider.h"
@@ -47,21 +48,21 @@ void DidOpenFileSystem(
} // anonymous namespace
FileSystemContext::FileSystemContext(
- base::SequencedTaskRunner* file_task_runner,
- base::SingleThreadTaskRunner* io_task_runner,
+ scoped_ptr<FileSystemTaskRunners> task_runners,
quota::SpecialStoragePolicy* special_storage_policy,
quota::QuotaManagerProxy* quota_manager_proxy,
const FilePath& profile_path,
const FileSystemOptions& options)
- : file_task_runner_(file_task_runner),
- io_task_runner_(io_task_runner),
+ : task_runners_(task_runners.Pass()),
quota_manager_proxy_(quota_manager_proxy),
sandbox_provider_(
new SandboxMountPointProvider(
- file_task_runner,
+ task_runners_->file_task_runner(),
profile_path,
options)),
isolated_provider_(new IsolatedMountPointProvider(profile_path)) {
+ DCHECK(task_runners_.get());
+
if (quota_manager_proxy) {
quota_manager_proxy->RegisterClient(CreateQuotaClient(
this, options.is_incognito()));
@@ -74,7 +75,7 @@ FileSystemContext::FileSystemContext(
bool FileSystemContext::DeleteDataForOriginOnFileThread(
const GURL& origin_url) {
- DCHECK(file_task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(task_runners_->file_task_runner()->RunsTasksOnCurrentThread());
DCHECK(sandbox_provider());
// Delete temporary and persistent data.
@@ -208,8 +209,8 @@ void FileSystemContext::RegisterMountPointProvider(
FileSystemContext::~FileSystemContext() {}
void FileSystemContext::DeleteOnCorrectThread() const {
- if (!io_task_runner_->RunsTasksOnCurrentThread() &&
- io_task_runner_->DeleteSoon(FROM_HERE, this)) {
+ if (!task_runners_->io_task_runner()->RunsTasksOnCurrentThread() &&
+ task_runners_->io_task_runner()->DeleteSoon(FROM_HERE, this)) {
return;
}
STLDeleteContainerPairSecondPointers(provider_map_.begin(),
« no previous file with comments | « webkit/fileapi/file_system_context.h ('k') | webkit/fileapi/file_system_dir_url_request_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698