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

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

Issue 8999017: Add CreateFileSystemOperation() method to FileSystemContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clang build fix Created 8 years, 11 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_OPERATION_H_ 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 25 matching lines...) Expand all
36 namespace fileapi { 36 namespace fileapi {
37 37
38 class FileSystemCallbackDispatcher; 38 class FileSystemCallbackDispatcher;
39 class FileSystemContext; 39 class FileSystemContext;
40 class FileWriterDelegate; 40 class FileWriterDelegate;
41 class FileSystemOperationTest; 41 class FileSystemOperationTest;
42 42
43 // FileSystemOperation implementation for local file systems. 43 // FileSystemOperation implementation for local file systems.
44 class FileSystemOperation : public FileSystemOperationInterface { 44 class FileSystemOperation : public FileSystemOperationInterface {
45 public: 45 public:
46 FileSystemOperation(scoped_ptr<FileSystemCallbackDispatcher> dispatcher,
47 scoped_refptr<base::MessageLoopProxy> proxy,
48 FileSystemContext* file_system_context);
49 virtual ~FileSystemOperation(); 46 virtual ~FileSystemOperation();
50 47
51 // FileSystemOperation overrides. 48 // FileSystemOperation overrides.
52 virtual void CreateFile(const GURL& path, 49 virtual void CreateFile(const GURL& path,
53 bool exclusive) OVERRIDE; 50 bool exclusive) OVERRIDE;
54 virtual void CreateDirectory(const GURL& path, 51 virtual void CreateDirectory(const GURL& path,
55 bool exclusive, 52 bool exclusive,
56 bool recursive) OVERRIDE; 53 bool recursive) OVERRIDE;
57 virtual void Copy(const GURL& src_path, 54 virtual void Copy(const GURL& src_path,
58 const GURL& dest_path) OVERRIDE; 55 const GURL& dest_path) OVERRIDE;
(...skipping 11 matching lines...) Expand all
70 virtual void Truncate(const GURL& path, int64 length) OVERRIDE; 67 virtual void Truncate(const GURL& path, int64 length) OVERRIDE;
71 virtual void TouchFile(const GURL& path, 68 virtual void TouchFile(const GURL& path,
72 const base::Time& last_access_time, 69 const base::Time& last_access_time,
73 const base::Time& last_modified_time) OVERRIDE; 70 const base::Time& last_modified_time) OVERRIDE;
74 virtual void OpenFile( 71 virtual void OpenFile(
75 const GURL& path, 72 const GURL& path,
76 int file_flags, 73 int file_flags,
77 base::ProcessHandle peer_handle) OVERRIDE; 74 base::ProcessHandle peer_handle) OVERRIDE;
78 virtual void Cancel( 75 virtual void Cancel(
79 scoped_ptr<FileSystemCallbackDispatcher> cancel_dispatcher) OVERRIDE; 76 scoped_ptr<FileSystemCallbackDispatcher> cancel_dispatcher) OVERRIDE;
77 virtual FileSystemOperation* AsFileSystemOperation() OVERRIDE;
80 78
81 // Synchronously gets the platform path for the given |path|. 79 // Synchronously gets the platform path for the given |path|.
82 void SyncGetPlatformPath(const GURL& path, FilePath* platform_path); 80 void SyncGetPlatformPath(const GURL& path, FilePath* platform_path);
83 81
84 private: 82 private:
85 class ScopedQuotaUtilHelper; 83 class ScopedQuotaUtilHelper;
86 84
85 // Only MountPointProviders or testing class can create a
86 // new operation directly.
87 friend class SandboxMountPointProvider;
88 friend class CrosMountPointProvider;
89 friend class FileSystemTestHelper;
90
91 FileSystemOperation(scoped_ptr<FileSystemCallbackDispatcher> dispatcher,
92 scoped_refptr<base::MessageLoopProxy> proxy,
93 FileSystemContext* file_system_context);
94
87 FileSystemContext* file_system_context() const { 95 FileSystemContext* file_system_context() const {
88 return operation_context_.file_system_context(); 96 return operation_context_.file_system_context();
89 } 97 }
90 98
91 FileSystemOperationContext* file_system_operation_context() { 99 FileSystemOperationContext* file_system_operation_context() {
92 return &operation_context_; 100 return &operation_context_;
93 } 101 }
94 102
95 friend class FileSystemOperationTest; 103 friend class FileSystemOperationTest;
96 friend class FileSystemOperationWriteTest; 104 friend class FileSystemOperationWriteTest;
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 // write. 276 // write.
269 FilePath src_virtual_path_; 277 FilePath src_virtual_path_;
270 FilePath dest_virtual_path_; 278 FilePath dest_virtual_path_;
271 279
272 DISALLOW_COPY_AND_ASSIGN(FileSystemOperation); 280 DISALLOW_COPY_AND_ASSIGN(FileSystemOperation);
273 }; 281 };
274 282
275 } // namespace fileapi 283 } // namespace fileapi
276 284
277 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ 285 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_mount_point_provider.h ('k') | webkit/fileapi/file_system_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698