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

Side by Side Diff: webkit/chromeos/fileapi/remote_file_system_operation.cc

Issue 10541113: Notify CloseFile from Pepper to FileSystem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. 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 #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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 } 169 }
170 DCHECK(SetPendingOperationType(kOperationOpenFile)); 170 DCHECK(SetPendingOperationType(kOperationOpenFile));
171 remote_proxy_->OpenFile( 171 remote_proxy_->OpenFile(
172 url, 172 url,
173 file_flags, 173 file_flags,
174 peer_handle, 174 peer_handle,
175 base::Bind(&RemoteFileSystemOperation::DidOpenFile, 175 base::Bind(&RemoteFileSystemOperation::DidOpenFile,
176 base::Owned(this), callback)); 176 base::Owned(this), callback));
177 } 177 }
178 178
179 void RemoteFileSystemOperation::NotifyCloseFile(
180 const fileapi::FileSystemURL& url) {
181 DCHECK(SetPendingOperationType(kOperationCloseFile));
182 remote_proxy_->NotifyCloseFile(url);
183 // Unlike other operations, NotifyCloseFile does not require callback.
184 // So it must be deleted here right now.
185 delete this;
186 }
187
179 fileapi::FileSystemOperation* 188 fileapi::FileSystemOperation*
180 RemoteFileSystemOperation::AsFileSystemOperation() { 189 RemoteFileSystemOperation::AsFileSystemOperation() {
181 NOTIMPLEMENTED(); 190 NOTIMPLEMENTED();
182 return NULL; 191 return NULL;
183 } 192 }
184 193
185 void RemoteFileSystemOperation::CreateSnapshotFile( 194 void RemoteFileSystemOperation::CreateSnapshotFile(
186 const FileSystemURL& url, 195 const FileSystemURL& url,
187 const SnapshotFileCallback& callback) { 196 const SnapshotFileCallback& callback) {
188 DCHECK(SetPendingOperationType(kOperationCreateSnapshotFile)); 197 DCHECK(SetPendingOperationType(kOperationCreateSnapshotFile));
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 278
270 void RemoteFileSystemOperation::DidOpenFile( 279 void RemoteFileSystemOperation::DidOpenFile(
271 const OpenFileCallback& callback, 280 const OpenFileCallback& callback,
272 base::PlatformFileError result, 281 base::PlatformFileError result,
273 base::PlatformFile file, 282 base::PlatformFile file,
274 base::ProcessHandle peer_handle) { 283 base::ProcessHandle peer_handle) {
275 callback.Run(result, file, peer_handle); 284 callback.Run(result, file, peer_handle);
276 } 285 }
277 286
278 } // namespace chromeos 287 } // namespace chromeos
OLDNEW
« no previous file with comments | « webkit/chromeos/fileapi/remote_file_system_operation.h ('k') | webkit/chromeos/fileapi/remote_file_system_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698