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

Unified Diff: content/browser/fileapi/browser_file_system_helper.cc

Issue 10829147: Make MediaFileUtil run on thread pool. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « no previous file | webkit/fileapi/file_system_context.h » ('j') | webkit/fileapi/file_system_context.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/fileapi/browser_file_system_helper.cc
diff --git a/content/browser/fileapi/browser_file_system_helper.cc b/content/browser/fileapi/browser_file_system_helper.cc
index a6321b04b4a440e5e4b1088a92821efb49052b6b..d57b1bbf245a52f955b5fb7745d6b3d01e8dfde4 100644
--- a/content/browser/fileapi/browser_file_system_helper.cc
+++ b/content/browser/fileapi/browser_file_system_helper.cc
@@ -9,9 +9,11 @@
#include "base/command_line.h"
#include "base/file_path.h"
+#include "base/threading/sequenced_worker_pool.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/content_switches.h"
#include "webkit/fileapi/file_system_options.h"
+#include "webkit/fileapi/file_system_task_runners.h"
#include "webkit/quota/quota_manager.h"
using content::BrowserThread;
@@ -43,9 +45,18 @@ scoped_refptr<fileapi::FileSystemContext> CreateFileSystemContext(
const FilePath& profile_path, bool is_incognito,
quota::SpecialStoragePolicy* special_storage_policy,
quota::QuotaManagerProxy* quota_manager_proxy) {
+ base::SequencedWorkerPool* pool = BrowserThread::GetBlockingPool();
+ base::SequencedWorkerPool::SequenceToken media_sequence_token =
+ pool->GetSequenceToken();
+
+ scoped_ptr<fileapi::FileSystemTaskRunners> task_runners(
+ new fileapi::FileSystemTaskRunners(
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
+ pool->GetSequencedTaskRunner(media_sequence_token)));
+
return new fileapi::FileSystemContext(
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
+ task_runners.Pass(),
special_storage_policy,
quota_manager_proxy,
profile_path,
« no previous file with comments | « no previous file | webkit/fileapi/file_system_context.h » ('j') | webkit/fileapi/file_system_context.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698