Index: content/renderer/pepper/pepper_file_io_host.cc |
diff --git a/content/renderer/pepper/pepper_file_io_host.cc b/content/renderer/pepper/pepper_file_io_host.cc |
index f6adcd4f7b20264fe3eb2cf1e42c730b81842af1..37a4ac94b24be729bef826698bf3fc9808fbffc3 100644 |
--- a/content/renderer/pepper/pepper_file_io_host.cc |
+++ b/content/renderer/pepper/pepper_file_io_host.cc |
@@ -171,7 +171,8 @@ int32_t PepperFileIOHost::OnHostMsgQuery( |
return PP_ERROR_FAILED; |
if (!base::FileUtilProxy::GetFileInfoFromPlatformFile( |
- plugin_delegate_->GetFileThreadMessageLoopProxy(), file_, |
+ plugin_delegate_->GetFileThreadMessageLoopProxy().get(), |
+ file_, |
base::Bind(&PepperFileIOHost::ExecutePlatformQueryCallback, |
weak_factory_.GetWeakPtr(), |
context->MakeReplyMessageContext()))) |
@@ -209,8 +210,9 @@ int32_t PepperFileIOHost::OnHostMsgTouch( |
// TODO(nhiroki): fix a failure of FileIO.Touch for an external filesystem on |
// Mac and Linux due to sandbox restrictions (http://crbug.com/101128). |
if (!base::FileUtilProxy::Touch( |
- plugin_delegate_->GetFileThreadMessageLoopProxy(), |
- file_, PPTimeToTime(last_access_time), |
+ plugin_delegate_->GetFileThreadMessageLoopProxy().get(), |
+ file_, |
+ PPTimeToTime(last_access_time), |
PPTimeToTime(last_modified_time), |
base::Bind(&PepperFileIOHost::ExecutePlatformGeneralCallback, |
weak_factory_.GetWeakPtr(), |
@@ -244,7 +246,9 @@ int32_t PepperFileIOHost::OnHostMsgRead( |
return PP_ERROR_FAILED; |
if (!base::FileUtilProxy::Read( |
- plugin_delegate_->GetFileThreadMessageLoopProxy(), file_, offset, |
+ plugin_delegate_->GetFileThreadMessageLoopProxy().get(), |
+ file_, |
+ offset, |
max_read_length, |
base::Bind(&PepperFileIOHost::ExecutePlatformReadCallback, |
weak_factory_.GetWeakPtr(), |
@@ -276,8 +280,11 @@ int32_t PepperFileIOHost::OnHostMsgWrite( |
return PP_ERROR_FAILED; |
if (!base::FileUtilProxy::Write( |
- plugin_delegate_->GetFileThreadMessageLoopProxy(), file_, offset, |
- buffer.c_str(), buffer.size(), |
+ plugin_delegate_->GetFileThreadMessageLoopProxy().get(), |
+ file_, |
+ offset, |
+ buffer.c_str(), |
+ buffer.size(), |
base::Bind(&PepperFileIOHost::ExecutePlatformWriteCallback, |
weak_factory_.GetWeakPtr(), |
context->MakeReplyMessageContext()))) |
@@ -310,7 +317,9 @@ int32_t PepperFileIOHost::OnHostMsgSetLength( |
// TODO(nhiroki): fix a failure of FileIO.SetLength for an external |
// filesystem on Mac due to sandbox restrictions (http://crbug.com/156077). |
if (!base::FileUtilProxy::Truncate( |
- plugin_delegate_->GetFileThreadMessageLoopProxy(), file_, length, |
+ plugin_delegate_->GetFileThreadMessageLoopProxy().get(), |
+ file_, |
+ length, |
base::Bind(&PepperFileIOHost::ExecutePlatformGeneralCallback, |
weak_factory_.GetWeakPtr(), |
context->MakeReplyMessageContext()))) |
@@ -332,7 +341,8 @@ int32_t PepperFileIOHost::OnHostMsgFlush( |
return PP_ERROR_FAILED; |
if (!base::FileUtilProxy::Flush( |
- plugin_delegate_->GetFileThreadMessageLoopProxy(), file_, |
+ plugin_delegate_->GetFileThreadMessageLoopProxy().get(), |
+ file_, |
base::Bind(&PepperFileIOHost::ExecutePlatformGeneralCallback, |
weak_factory_.GetWeakPtr(), |
context->MakeReplyMessageContext()))) |
@@ -346,7 +356,7 @@ int32_t PepperFileIOHost::OnHostMsgClose( |
ppapi::host::HostMessageContext* context) { |
if (file_ != base::kInvalidPlatformFileValue && plugin_delegate_) { |
base::FileUtilProxy::Close( |
- plugin_delegate_->GetFileThreadMessageLoopProxy(), |
+ plugin_delegate_->GetFileThreadMessageLoopProxy().get(), |
file_, |
base::ResetAndReturn(¬ify_close_file_callback_)); |
file_ = base::kInvalidPlatformFileValue; |