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

Unified Diff: webkit/plugins/ppapi/ppb_file_io_impl.cc

Issue 10541113: Notify CloseFile from Pepper to FileSystem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added DLOG, DCHECK. Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: webkit/plugins/ppapi/ppb_file_io_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_file_io_impl.cc b/webkit/plugins/ppapi/ppb_file_io_impl.cc
index d1022709bbf48801b1fad183f63527e9f8349f14..94c4b7bc6357c97d86df20c9ae01592507969d1b 100644
--- a/webkit/plugins/ppapi/ppb_file_io_impl.cc
+++ b/webkit/plugins/ppapi/ppb_file_io_impl.cc
@@ -210,9 +210,13 @@ int32_t PPB_FileIO_Impl::FlushValidated(
void PPB_FileIO_Impl::Close() {
PluginDelegate* plugin_delegate = GetPluginDelegate();
if (file_ != base::kInvalidPlatformFileValue && plugin_delegate) {
+ base::FileUtilProxy::StatusCallback callback;
+ if (!file_system_url_.is_empty()) {
zel 2012/06/26 01:42:18 file_system_url_ is going to be set only for local
kinaba 2012/06/26 04:19:22 Fmm, is it? I thought the code pass (not HasValidF
kinuko 2012/06/26 11:13:36 EXTERNAL file could be created without file system
zel 2012/06/26 23:51:57 Yeah, that seems correct. NaCl has two inconsisten
kinaba 2012/06/27 03:47:42 And I believe it is meant for read-only file open
+ callback = plugin_delegate->GetCloseFileSystemURLCallback(
+ file_system_url_);
+ }
base::FileUtilProxy::Close(
- plugin_delegate->GetFileThreadMessageLoopProxy(), file_,
- base::FileUtilProxy::StatusCallback());
+ plugin_delegate->GetFileThreadMessageLoopProxy(), file_, callback);
file_ = base::kInvalidPlatformFileValue;
quota_file_io_.reset();
}

Powered by Google App Engine
This is Rietveld 408576698