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

Side by Side Diff: webkit/fileapi/file_system_context.h

Issue 10829147: Make MediaFileUtil run on thread pool. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: +test_shell_tests fix 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_ 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_ 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 class FILEAPI_EXPORT FileSystemContext 51 class FILEAPI_EXPORT FileSystemContext
52 : public base::RefCountedThreadSafe<FileSystemContext, 52 : public base::RefCountedThreadSafe<FileSystemContext,
53 DefaultContextDeleter> { 53 DefaultContextDeleter> {
54 public: 54 public:
55 // |file_task_runner| is used for all file operations and file related 55 // |file_task_runner| is used for all file operations and file related
56 // meta operations. 56 // meta operations.
57 // The code assumes that file_task_runner->RunsTasksOnCurrentThread() returns 57 // The code assumes that file_task_runner->RunsTasksOnCurrentThread() returns
58 // false if the current task is not running on the thread that allows 58 // false if the current task is not running on the thread that allows
59 // blocking file operations (like SequencedWorkerPool implementation does). 59 // blocking file operations (like SequencedWorkerPool implementation does).
60 FileSystemContext( 60 FileSystemContext(
61 base::SequencedTaskRunner* media_task_runner,
61 base::SequencedTaskRunner* file_task_runner, 62 base::SequencedTaskRunner* file_task_runner,
62 base::SingleThreadTaskRunner* io_task_runner, 63 base::SingleThreadTaskRunner* io_task_runner,
63 quota::SpecialStoragePolicy* special_storage_policy, 64 quota::SpecialStoragePolicy* special_storage_policy,
64 quota::QuotaManagerProxy* quota_manager_proxy, 65 quota::QuotaManagerProxy* quota_manager_proxy,
65 const FilePath& profile_path, 66 const FilePath& profile_path,
66 const FileSystemOptions& options); 67 const FileSystemOptions& options);
67 68
68 bool DeleteDataForOriginOnFileThread(const GURL& origin_url); 69 bool DeleteDataForOriginOnFileThread(const GURL& origin_url);
69 bool DeleteDataForOriginAndTypeOnFileThread(const GURL& origin_url, 70 bool DeleteDataForOriginAndTypeOnFileThread(const GURL& origin_url,
70 FileSystemType type); 71 FileSystemType type);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 170
170 struct DefaultContextDeleter { 171 struct DefaultContextDeleter {
171 static void Destruct(const FileSystemContext* context) { 172 static void Destruct(const FileSystemContext* context) {
172 context->DeleteOnCorrectThread(); 173 context->DeleteOnCorrectThread();
173 } 174 }
174 }; 175 };
175 176
176 } // namespace fileapi 177 } // namespace fileapi
177 178
178 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_ 179 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698