OLD | NEW |
---|---|
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 #include "webkit/chromeos/fileapi/remote_file_system_operation.h" | 5 #include "webkit/chromeos/fileapi/remote_file_system_operation.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "base/platform_file.h" | 9 #include "base/platform_file.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
163 } | 163 } |
164 DCHECK(SetPendingOperationType(kOperationOpenFile)); | 164 DCHECK(SetPendingOperationType(kOperationOpenFile)); |
165 remote_proxy_->OpenFile( | 165 remote_proxy_->OpenFile( |
166 path, | 166 path, |
167 file_flags, | 167 file_flags, |
168 peer_handle, | 168 peer_handle, |
169 base::Bind(&RemoteFileSystemOperation::DidOpenFile, | 169 base::Bind(&RemoteFileSystemOperation::DidOpenFile, |
170 base::Owned(this), callback)); | 170 base::Owned(this), callback)); |
171 } | 171 } |
172 | 172 |
173 void RemoteFileSystemOperation::NotifyCloseFile(const GURL& path) { | |
174 DCHECK(SetPendingOperationType(kOperationCloseFile)); | |
175 remote_proxy_->NotifyCloseFile(path); | |
kinuko
2012/06/25 11:46:54
Who should delete this operation in this case?
kinaba
2012/06/26 00:15:10
The operation itself. Added delete this.
| |
176 } | |
177 | |
173 fileapi::FileSystemOperation* | 178 fileapi::FileSystemOperation* |
174 RemoteFileSystemOperation::AsFileSystemOperation() { | 179 RemoteFileSystemOperation::AsFileSystemOperation() { |
175 NOTIMPLEMENTED(); | 180 NOTIMPLEMENTED(); |
176 return NULL; | 181 return NULL; |
177 } | 182 } |
178 | 183 |
179 void RemoteFileSystemOperation::CreateSnapshotFile( | 184 void RemoteFileSystemOperation::CreateSnapshotFile( |
180 const GURL& path, | 185 const GURL& path, |
181 const SnapshotFileCallback& callback) { | 186 const SnapshotFileCallback& callback) { |
182 DCHECK(SetPendingOperationType(kOperationCreateSnapshotFile)); | 187 DCHECK(SetPendingOperationType(kOperationCreateSnapshotFile)); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
263 | 268 |
264 void RemoteFileSystemOperation::DidOpenFile( | 269 void RemoteFileSystemOperation::DidOpenFile( |
265 const OpenFileCallback& callback, | 270 const OpenFileCallback& callback, |
266 base::PlatformFileError result, | 271 base::PlatformFileError result, |
267 base::PlatformFile file, | 272 base::PlatformFile file, |
268 base::ProcessHandle peer_handle) { | 273 base::ProcessHandle peer_handle) { |
269 callback.Run(result, file, peer_handle); | 274 callback.Run(result, file, peer_handle); |
270 } | 275 } |
271 | 276 |
272 } // namespace chromeos | 277 } // namespace chromeos |
OLD | NEW |