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

Unified Diff: content/renderer/pepper/pepper_file_io_host.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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: 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(&notify_close_file_callback_));
file_ = base::kInvalidPlatformFileValue;
« no previous file with comments | « content/renderer/media/rtc_peer_connection_handler.cc ('k') | content/renderer/pepper/pepper_platform_audio_input_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698