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

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 (take 2). 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 } 166 }
167 DCHECK(SetPendingOperationType(kOperationOpenFile)); 167 DCHECK(SetPendingOperationType(kOperationOpenFile));
168 remote_proxy_->OpenFile( 168 remote_proxy_->OpenFile(
169 url, 169 url,
170 file_flags, 170 file_flags,
171 peer_handle, 171 peer_handle,
172 base::Bind(&RemoteFileSystemOperation::DidOpenFile, 172 base::Bind(&RemoteFileSystemOperation::DidOpenFile,
173 base::Owned(this), callback)); 173 base::Owned(this), callback));
174 } 174 }
175 175
176 void RemoteFileSystemOperation::NotifyCloseFile(
177 const fileapi::FileSystemURL& url) {
178 DCHECK(SetPendingOperationType(kOperationCloseFile));
179 remote_proxy_->NotifyCloseFile(url);
180 // Unlike other operations, NotifyCloseFile does not require callback.
181 // So it must be deleted here right now.
182 delete this;
183 }
184
176 fileapi::FileSystemOperation* 185 fileapi::FileSystemOperation*
177 RemoteFileSystemOperation::AsFileSystemOperation() { 186 RemoteFileSystemOperation::AsFileSystemOperation() {
178 NOTIMPLEMENTED(); 187 NOTIMPLEMENTED();
179 return NULL; 188 return NULL;
180 } 189 }
181 190
182 void RemoteFileSystemOperation::CreateSnapshotFile( 191 void RemoteFileSystemOperation::CreateSnapshotFile(
183 const FileSystemURL& url, 192 const FileSystemURL& url,
184 const SnapshotFileCallback& callback) { 193 const SnapshotFileCallback& callback) {
185 DCHECK(SetPendingOperationType(kOperationCreateSnapshotFile)); 194 DCHECK(SetPendingOperationType(kOperationCreateSnapshotFile));
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 275
267 void RemoteFileSystemOperation::DidOpenFile( 276 void RemoteFileSystemOperation::DidOpenFile(
268 const OpenFileCallback& callback, 277 const OpenFileCallback& callback,
269 base::PlatformFileError result, 278 base::PlatformFileError result,
270 base::PlatformFile file, 279 base::PlatformFile file,
271 base::ProcessHandle peer_handle) { 280 base::ProcessHandle peer_handle) {
272 callback.Run(result, file, peer_handle); 281 callback.Run(result, file, peer_handle);
273 } 282 }
274 283
275 } // namespace chromeos 284 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698