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

Side by Side Diff: chrome/browser/chromeos/fileapi/remote_file_system_operation.h

Issue 18612002: Extract Drive related code to drive::MountPointProviderDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CHROME_BROWSER_CHROMEOS_FILEAPI_REMOTE_FILE_SYSTEM_OPERATION_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_FILEAPI_REMOTE_FILE_SYSTEM_OPERATION_H_
6 #define CHROME_BROWSER_CHROMEOS_FILEAPI_REMOTE_FILE_SYSTEM_OPERATION_H_ 6 #define CHROME_BROWSER_CHROMEOS_FILEAPI_REMOTE_FILE_SYSTEM_OPERATION_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "webkit/browser/fileapi/file_system_operation.h" 10 #include "webkit/browser/fileapi/file_system_operation.h"
(...skipping 10 matching lines...) Expand all
21 } 21 }
22 22
23 namespace chromeos { 23 namespace chromeos {
24 24
25 // FileSystemOperation implementation for local file systems. 25 // FileSystemOperation implementation for local file systems.
26 class RemoteFileSystemOperation 26 class RemoteFileSystemOperation
27 : public fileapi::FileSystemOperation, 27 : public fileapi::FileSystemOperation,
28 public base::SupportsWeakPtr<RemoteFileSystemOperation> { 28 public base::SupportsWeakPtr<RemoteFileSystemOperation> {
29 public: 29 public:
30 typedef fileapi::FileWriterDelegate FileWriterDelegate; 30 typedef fileapi::FileWriterDelegate FileWriterDelegate;
31
32 explicit RemoteFileSystemOperation(
33 scoped_refptr<fileapi::RemoteFileSystemProxyInterface> remote_proxy);
34
31 virtual ~RemoteFileSystemOperation(); 35 virtual ~RemoteFileSystemOperation();
32 36
33 // FileSystemOperation overrides. 37 // FileSystemOperation overrides.
34 virtual void CreateFile(const fileapi::FileSystemURL& url, 38 virtual void CreateFile(const fileapi::FileSystemURL& url,
35 bool exclusive, 39 bool exclusive,
36 const StatusCallback& callback) OVERRIDE; 40 const StatusCallback& callback) OVERRIDE;
37 virtual void CreateDirectory(const fileapi::FileSystemURL& url, 41 virtual void CreateDirectory(const fileapi::FileSystemURL& url,
38 bool exclusive, 42 bool exclusive,
39 bool recursive, 43 bool recursive,
40 const StatusCallback& callback) OVERRIDE; 44 const StatusCallback& callback) OVERRIDE;
(...skipping 29 matching lines...) Expand all
70 int file_flags, 74 int file_flags,
71 base::ProcessHandle peer_handle, 75 base::ProcessHandle peer_handle,
72 const OpenFileCallback& callback) OVERRIDE; 76 const OpenFileCallback& callback) OVERRIDE;
73 virtual fileapi::LocalFileSystemOperation* 77 virtual fileapi::LocalFileSystemOperation*
74 AsLocalFileSystemOperation() OVERRIDE; 78 AsLocalFileSystemOperation() OVERRIDE;
75 virtual void CreateSnapshotFile( 79 virtual void CreateSnapshotFile(
76 const fileapi::FileSystemURL& url, 80 const fileapi::FileSystemURL& url,
77 const SnapshotFileCallback& callback) OVERRIDE; 81 const SnapshotFileCallback& callback) OVERRIDE;
78 82
79 private: 83 private:
80 friend class CrosMountPointProvider;
81
82 RemoteFileSystemOperation(
83 scoped_refptr<fileapi::RemoteFileSystemProxyInterface> remote_proxy);
84
85 // Used only for internal assertions. 84 // Used only for internal assertions.
86 // Returns false if there's another inflight pending operation. 85 // Returns false if there's another inflight pending operation.
87 bool SetPendingOperationType(OperationType type); 86 bool SetPendingOperationType(OperationType type);
88 87
89 // Generic callback that translates platform errors to WebKit error codes. 88 // Generic callback that translates platform errors to WebKit error codes.
90 void DidDirectoryExists(const StatusCallback& callback, 89 void DidDirectoryExists(const StatusCallback& callback,
91 base::PlatformFileError rv, 90 base::PlatformFileError rv,
92 const base::PlatformFileInfo& file_info); 91 const base::PlatformFileInfo& file_info);
93 void DidFileExists(const StatusCallback& callback, 92 void DidFileExists(const StatusCallback& callback,
94 base::PlatformFileError rv, 93 base::PlatformFileError rv,
(...skipping 17 matching lines...) Expand all
112 scoped_ptr<fileapi::FileWriterDelegate> file_writer_delegate_; 111 scoped_ptr<fileapi::FileWriterDelegate> file_writer_delegate_;
113 112
114 StatusCallback cancel_callback_; 113 StatusCallback cancel_callback_;
115 114
116 DISALLOW_COPY_AND_ASSIGN(RemoteFileSystemOperation); 115 DISALLOW_COPY_AND_ASSIGN(RemoteFileSystemOperation);
117 }; 116 };
118 117
119 } // namespace chromeos 118 } // namespace chromeos
120 119
121 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_REMOTE_FILE_SYSTEM_OPERATION_H_ 120 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_REMOTE_FILE_SYSTEM_OPERATION_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/fileapi/cros_mount_point_provider_unittest.cc ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698