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

Unified Diff: chrome/browser/chromeos/drive/async_file_util.cc

Issue 19596003: Remove CloseFile from FileSystem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/dummy_file_system.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/async_file_util.cc
diff --git a/chrome/browser/chromeos/drive/async_file_util.cc b/chrome/browser/chromeos/drive/async_file_util.cc
index e385033e960a0744a1e0d8a8d30d9892e9defaf7..a2b0e88cfefa3fc238defc4989f0fb4f905a6eeb 100644
--- a/chrome/browser/chromeos/drive/async_file_util.cc
+++ b/chrome/browser/chromeos/drive/async_file_util.cc
@@ -50,7 +50,8 @@ void RunCreateOrOpenFileCallback(
const base::FilePath& file_path,
const AsyncFileUtil::CreateOrOpenCallback& callback,
base::PlatformFileError error,
- base::PlatformFile file) {
+ base::PlatformFile file,
+ const base::Closure& close_callback_on_ui_thread) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
// It is necessary to make a closure, which runs on file closing here.
@@ -58,10 +59,9 @@ void RunCreateOrOpenFileCallback(
// (crbug.com/259184).
callback.Run(
error, base::PassPlatformFile(&file),
- base::Bind(&PostFileSystemCallback,
- file_system_getter,
- base::Bind(&fileapi_internal::CloseFile, file_path),
- base::Closure()));
+ base::Bind(&google_apis::RunTaskOnThread,
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
+ close_callback_on_ui_thread));
}
// Runs CreateOrOpenFile when the error happens.
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/dummy_file_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698