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

Unified Diff: content/renderer/pepper_plugin_delegate_impl.cc

Issue 8231004: Remaining cleanup (base::Bind): Replacing FileUtilProxy calls with new callback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: got it building Created 9 years, 2 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: content/renderer/pepper_plugin_delegate_impl.cc
diff --git a/content/renderer/pepper_plugin_delegate_impl.cc b/content/renderer/pepper_plugin_delegate_impl.cc
index 35fc894bdbdf8fa579743e198afcdf54c9ff3c84..d5727b3eb5b185c1233f51fef925e15282de8e94 100644
--- a/content/renderer/pepper_plugin_delegate_impl.cc
+++ b/content/renderer/pepper_plugin_delegate_impl.cc
@@ -1041,7 +1041,10 @@ void PepperPluginDelegateImpl::OnAsyncFileOpened(
callback->Run(error_code, base::PassPlatformFile(&file));
// Make sure we won't leak file handle if the requester has died.
if (file != base::kInvalidPlatformFileValue)
- base::FileUtilProxy::Close(GetFileThreadMessageLoopProxy(), file, NULL);
+ GetFileThreadMessageLoopProxy()->PostTask(
+ FROM_HERE,
+ base::IgnoreReturn(base::Callback<bool(void)>(
+ base::Bind(&base::ClosePlatformFile, file))));
delete callback;
}
@@ -1254,8 +1257,10 @@ class AsyncOpenFileSystemURLCallbackTranslator
callback_.Run(base::PLATFORM_FILE_OK, base::PassPlatformFile(&file));
// Make sure we won't leak file handle if the requester has died.
if (file != base::kInvalidPlatformFileValue) {
- base::FileUtilProxy::Close(RenderThreadImpl::current()->
- GetFileThreadMessageLoopProxy(), file, NULL);
+ RenderThreadImpl::current()->GetFileThreadMessageLoopProxy()->PostTask(
+ FROM_HERE,
+ base::IgnoreReturn(base::Callback<bool(void)>(
+ base::Bind(&base::ClosePlatformFile, file))));
}
}

Powered by Google App Engine
This is Rietveld 408576698