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

Side by Side Diff: webkit/fileapi/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/fileapi/file_system_operation.h" 5 #include "webkit/fileapi/file_system_operation.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/sequenced_task_runner.h" 8 #include "base/sequenced_task_runner.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 GetUsageAndQuotaThenRunTask( 376 GetUsageAndQuotaThenRunTask(
377 url, 377 url,
378 base::Bind(&FileSystemOperation::DoOpenFile, 378 base::Bind(&FileSystemOperation::DoOpenFile,
379 base::Unretained(deleter.release()), 379 base::Unretained(deleter.release()),
380 url, callback, file_flags), 380 url, callback, file_flags),
381 base::Bind(callback, base::PLATFORM_FILE_ERROR_FAILED, 381 base::Bind(callback, base::PLATFORM_FILE_ERROR_FAILED,
382 base::kInvalidPlatformFileValue, 382 base::kInvalidPlatformFileValue,
383 base::kNullProcessHandle)); 383 base::kNullProcessHandle));
384 } 384 }
385 385
386 void FileSystemOperation::NotifyCloseFile(const FileSystemURL& url) {
387 // No particular task to do. This method is for remote file systems that
388 // need synchronization with remote server.
389 delete this;
390 }
391
386 // We can only get here on a write or truncate that's not yet completed. 392 // We can only get here on a write or truncate that's not yet completed.
387 // We don't support cancelling any other operation at this time. 393 // We don't support cancelling any other operation at this time.
388 void FileSystemOperation::Cancel(const StatusCallback& cancel_callback) { 394 void FileSystemOperation::Cancel(const StatusCallback& cancel_callback) {
389 if (file_writer_delegate_.get()) { 395 if (file_writer_delegate_.get()) {
390 DCHECK_EQ(kOperationWrite, pending_operation_); 396 DCHECK_EQ(kOperationWrite, pending_operation_);
391 397
392 // Writes are done without proxying through FileUtilProxy after the initial 398 // Writes are done without proxying through FileUtilProxy after the initial
393 // opening of the PlatformFile. All state changes are done on this thread, 399 // opening of the PlatformFile. All state changes are done on this thread,
394 // so we're guaranteed to be able to shut down atomically. 400 // so we're guaranteed to be able to shut down atomically.
395 const bool delete_now = file_writer_delegate_->Cancel(); 401 const bool delete_now = file_writer_delegate_->Cancel();
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 } 715 }
710 716
711 bool FileSystemOperation::SetPendingOperationType(OperationType type) { 717 bool FileSystemOperation::SetPendingOperationType(OperationType type) {
712 if (pending_operation_ != kOperationNone) 718 if (pending_operation_ != kOperationNone)
713 return false; 719 return false;
714 pending_operation_ = type; 720 pending_operation_ = type;
715 return true; 721 return true;
716 } 722 }
717 723
718 } // namespace fileapi 724 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_operation.h ('k') | webkit/fileapi/file_system_operation_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698