Commit 5a491428 authored by satorux@chromium.org's avatar satorux@chromium.org

gdata: Reduce use of GetWeakPtrForCurrentThread()

In some functions, we know that we are on UI thread, so we can
directly use ui_weak_ptr_.

BUG=chromium-os:28503
TEST=none

Review URL: https://chromiumcodereview.appspot.com/10169041

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133811 0039d316-1c4b-4281-b951-d872f2087c98
parent fde23027
......@@ -1189,7 +1189,7 @@ void GDataFileSystem::TransferFile(const FilePath& local_file_path,
local_file_path,
resource_id),
base::Bind(&GDataFileSystem::TransferFileForResourceId,
GetWeakPtrForCurrentThread(),
ui_weak_ptr_,
local_file_path,
remote_dest_file_path,
callback,
......@@ -1239,7 +1239,7 @@ void GDataFileSystem::TransferRegularFile(
error,
upload_file_info),
base::Bind(&GDataFileSystem::StartFileUploadOnUIThread,
GetWeakPtrForCurrentThread(),
ui_weak_ptr_,
callback,
error,
upload_file_info));
......@@ -1272,7 +1272,7 @@ void GDataFileSystem::StartFileUploadOnUIThread(
upload_file_info->completion_callback =
base::Bind(&GDataFileSystem::OnTransferCompleted,
GetWeakPtrForCurrentThread(),
ui_weak_ptr_,
callback);
service->uploader()->UploadFile(scoped_ptr<UploadFileInfo>(upload_file_info));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment