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

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

Issue 12084077: FileSystem mods: Changes to snapshot file creation to remove dependencies on blobs. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 10 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 // This returns a raw open PlatformFile, unlike the above, which are 85 // This returns a raw open PlatformFile, unlike the above, which are
86 // self-contained operations. 86 // self-contained operations.
87 bool OpenFile(const GURL& file_path, 87 bool OpenFile(const GURL& file_path,
88 int file_flags, // passed to FileUtilProxy::CreateOrOpen 88 int file_flags, // passed to FileUtilProxy::CreateOrOpen
89 fileapi::FileSystemCallbackDispatcher* dispatcher); 89 fileapi::FileSystemCallbackDispatcher* dispatcher);
90 // This must be paired with OpenFile, and called after finished using the 90 // This must be paired with OpenFile, and called after finished using the
91 // raw PlatformFile returned from OpenFile. 91 // raw PlatformFile returned from OpenFile.
92 bool NotifyCloseFile(const GURL& file_path); 92 bool NotifyCloseFile(const GURL& file_path);
93 93
94 bool CreateSnapshotFile(const GURL& blod_url, 94 bool CreateSnapshotFile(const GURL& file_path,
95 const GURL& file_path,
96 fileapi::FileSystemCallbackDispatcher* dispatcher); 95 fileapi::FileSystemCallbackDispatcher* dispatcher);
96
97 bool CreateSnapshotFile_Deprecated(
98 const GURL& blod_url,
99 const GURL& file_path,
100 fileapi::FileSystemCallbackDispatcher* dispatcher);
101
97 private: 102 private:
98 // Message handlers. 103 // Message handlers.
99 void OnDidOpenFileSystem(int request_id, 104 void OnDidOpenFileSystem(int request_id,
100 const std::string& name, 105 const std::string& name,
101 const GURL& root); 106 const GURL& root);
102 void OnDidSucceed(int request_id); 107 void OnDidSucceed(int request_id);
103 void OnDidReadMetadata(int request_id, 108 void OnDidReadMetadata(int request_id,
104 const base::PlatformFileInfo& file_info, 109 const base::PlatformFileInfo& file_info,
105 const base::FilePath& platform_path); 110 const base::FilePath& platform_path);
111 void OnDidCreateSnapshotFile(int request_id,
112 const base::PlatformFileInfo& file_info,
113 const base::FilePath& platform_path);
106 void OnDidReadDirectory( 114 void OnDidReadDirectory(
107 int request_id, 115 int request_id,
108 const std::vector<base::FileUtilProxy::Entry>& entries, 116 const std::vector<base::FileUtilProxy::Entry>& entries,
109 bool has_more); 117 bool has_more);
110 void OnDidFail(int request_id, base::PlatformFileError error_code); 118 void OnDidFail(int request_id, base::PlatformFileError error_code);
111 void OnDidWrite(int request_id, int64 bytes, bool complete); 119 void OnDidWrite(int request_id, int64 bytes, bool complete);
112 void OnDidOpenFile( 120 void OnDidOpenFile(
113 int request_id, 121 int request_id,
114 IPC::PlatformFileForTransit file); 122 IPC::PlatformFileForTransit file);
115 123
116 IDMap<fileapi::FileSystemCallbackDispatcher, IDMapOwnPointer> dispatchers_; 124 IDMap<fileapi::FileSystemCallbackDispatcher, IDMapOwnPointer> dispatchers_;
117 125
118 DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcher); 126 DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcher);
119 }; 127 };
120 128
121 } // namespace content 129 } // namespace content
122 130
123 #endif // CONTENT_COMMON_FILEAPI_FILE_SYSTEM_DISPATCHER_H_ 131 #endif // CONTENT_COMMON_FILEAPI_FILE_SYSTEM_DISPATCHER_H_
OLDNEW
« no previous file with comments | « content/browser/fileapi/fileapi_message_filter.cc ('k') | content/common/fileapi/file_system_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698