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

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: rebased from patch 9016020 Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 26 matching lines...) Expand all
37 namespace fileapi { 37 namespace fileapi {
38 38
39 class FileSystemCallbackDispatcher; 39 class FileSystemCallbackDispatcher;
40 class FileSystemContext; 40 class FileSystemContext;
41 class FileWriterDelegate; 41 class FileWriterDelegate;
42 class FileSystemOperationTest; 42 class FileSystemOperationTest;
43 43
44 // FileSystemOperation implementation for local file systems. 44 // FileSystemOperation implementation for local file systems.
45 class FileSystemOperation : public FileSystemOperationInterface { 45 class FileSystemOperation : public FileSystemOperationInterface {
46 public: 46 public:
47 // |dispatcher| will be owned by this class.
48 FileSystemOperation(FileSystemCallbackDispatcher* dispatcher,
49 scoped_refptr<base::MessageLoopProxy> proxy,
50 FileSystemContext* file_system_context);
51 virtual ~FileSystemOperation(); 47 virtual ~FileSystemOperation();
52 48
53 // FileSystemOperation overrides. 49 // FileSystemOperation overrides.
54 virtual void CreateFile(const GURL& path, 50 virtual void CreateFile(const GURL& path,
55 bool exclusive) OVERRIDE; 51 bool exclusive) OVERRIDE;
56 virtual void CreateDirectory(const GURL& path, 52 virtual void CreateDirectory(const GURL& path,
57 bool exclusive, 53 bool exclusive,
58 bool recursive) OVERRIDE; 54 bool recursive) OVERRIDE;
59 virtual void Copy(const GURL& src_path, 55 virtual void Copy(const GURL& src_path,
60 const GURL& dest_path) OVERRIDE; 56 const GURL& dest_path) OVERRIDE;
(...skipping 17 matching lines...) Expand all
78 int file_flags, 74 int file_flags,
79 base::ProcessHandle peer_handle) OVERRIDE; 75 base::ProcessHandle peer_handle) OVERRIDE;
80 virtual void Cancel(FileSystemCallbackDispatcher* cancel_dispatcher) OVERRIDE; 76 virtual void Cancel(FileSystemCallbackDispatcher* cancel_dispatcher) OVERRIDE;
81 77
82 // Synchronously gets the platform path for the given |path|. 78 // Synchronously gets the platform path for the given |path|.
83 void SyncGetPlatformPath(const GURL& path, FilePath* platform_path); 79 void SyncGetPlatformPath(const GURL& path, FilePath* platform_path);
84 80
85 private: 81 private:
86 class ScopedQuotaUtilHelper; 82 class ScopedQuotaUtilHelper;
87 83
84 // Only MountPointProviders or testing class can create a
85 // new operation directly.
86 friend class SandboxMountPointProvider;
87 friend class CrosMountPointProvider;
88 friend class FileSystemTestHelper;
89
90 // |dispatcher| will be owned by this class.
91 FileSystemOperation(FileSystemCallbackDispatcher* dispatcher,
92 scoped_refptr<base::MessageLoopProxy> proxy,
93 FileSystemContext* file_system_context);
94
88 FileSystemContext* file_system_context() const { 95 FileSystemContext* file_system_context() const {
89 return operation_context_.file_system_context(); 96 return operation_context_.file_system_context();
90 } 97 }
91 98
92 FileSystemOperationContext* file_system_operation_context() { 99 FileSystemOperationContext* file_system_operation_context() {
93 return &operation_context_; 100 return &operation_context_;
94 } 101 }
95 102
96 friend class FileSystemOperationTest; 103 friend class FileSystemOperationTest;
97 friend class FileSystemOperationWriteTest; 104 friend class FileSystemOperationWriteTest;
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 // write. 276 // write.
270 FilePath src_virtual_path_; 277 FilePath src_virtual_path_;
271 FilePath dest_virtual_path_; 278 FilePath dest_virtual_path_;
272 279
273 DISALLOW_COPY_AND_ASSIGN(FileSystemOperation); 280 DISALLOW_COPY_AND_ASSIGN(FileSystemOperation);
274 }; 281 };
275 282
276 } // namespace fileapi 283 } // namespace fileapi
277 284
278 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ 285 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698