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

Side by Side Diff: content/common/fileapi/file_system_dispatcher.h

Issue 10600013: Wired support for file truncating with RemoteFileSystemOperation::OpenFile() method (case when base… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 (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 CONTENT_COMMON_FILEAPI_FILE_SYSTEM_DISPATCHER_H_ 5 #ifndef CONTENT_COMMON_FILEAPI_FILE_SYSTEM_DISPATCHER_H_
6 #define CONTENT_COMMON_FILEAPI_FILE_SYSTEM_DISPATCHER_H_ 6 #define CONTENT_COMMON_FILEAPI_FILE_SYSTEM_DISPATCHER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 const base::Time& last_access_time, 76 const base::Time& last_access_time,
77 const base::Time& last_modified_time, 77 const base::Time& last_modified_time,
78 fileapi::FileSystemCallbackDispatcher* dispatcher); 78 fileapi::FileSystemCallbackDispatcher* dispatcher);
79 79
80 // This returns a raw open PlatformFile, unlike the above, which are 80 // This returns a raw open PlatformFile, unlike the above, which are
81 // self-contained operations. 81 // self-contained operations.
82 bool OpenFile(const GURL& file_path, 82 bool OpenFile(const GURL& file_path,
83 int file_flags, // passed to FileUtilProxy::CreateOrOpen 83 int file_flags, // passed to FileUtilProxy::CreateOrOpen
84 fileapi::FileSystemCallbackDispatcher* dispatcher); 84 fileapi::FileSystemCallbackDispatcher* dispatcher);
85 85
86 bool NotifyFileClosed(const GURL& path);
87
86 bool CreateSnapshotFile(const GURL& blod_url, 88 bool CreateSnapshotFile(const GURL& blod_url,
87 const GURL& file_path, 89 const GURL& file_path,
88 fileapi::FileSystemCallbackDispatcher* dispatcher); 90 fileapi::FileSystemCallbackDispatcher* dispatcher);
89 private: 91 private:
90 // Message handlers. 92 // Message handlers.
91 void OnDidOpenFileSystem(int request_id, 93 void OnDidOpenFileSystem(int request_id,
92 const std::string& name, 94 const std::string& name,
93 const GURL& root); 95 const GURL& root);
94 void OnDidSucceed(int request_id); 96 void OnDidSucceed(int request_id);
95 void OnDidReadMetadata(int request_id, 97 void OnDidReadMetadata(int request_id,
96 const base::PlatformFileInfo& file_info, 98 const base::PlatformFileInfo& file_info,
97 const FilePath& platform_path); 99 const FilePath& platform_path);
98 void OnDidReadDirectory( 100 void OnDidReadDirectory(
99 int request_id, 101 int request_id,
100 const std::vector<base::FileUtilProxy::Entry>& entries, 102 const std::vector<base::FileUtilProxy::Entry>& entries,
101 bool has_more); 103 bool has_more);
102 void OnDidFail(int request_id, base::PlatformFileError error_code); 104 void OnDidFail(int request_id, base::PlatformFileError error_code);
103 void OnDidWrite(int request_id, int64 bytes, bool complete); 105 void OnDidWrite(int request_id, int64 bytes, bool complete);
104 void OnDidOpenFile( 106 void OnDidOpenFile(
105 int request_id, 107 int request_id,
106 IPC::PlatformFileForTransit file); 108 IPC::PlatformFileForTransit file);
109 void OnDidCloseFile(int request_id,
110 base::PlatformFileError error_code);
107 111
108 IDMap<fileapi::FileSystemCallbackDispatcher, IDMapOwnPointer> dispatchers_; 112 IDMap<fileapi::FileSystemCallbackDispatcher, IDMapOwnPointer> dispatchers_;
109 113
110 DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcher); 114 DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcher);
111 }; 115 };
112 116
113 #endif // CONTENT_COMMON_FILEAPI_FILE_SYSTEM_DISPATCHER_H_ 117 #endif // CONTENT_COMMON_FILEAPI_FILE_SYSTEM_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698