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

Unified Diff: ppapi/shared_impl/ppb_audio_shared.cc

Issue 10828023: PPAPI/NaCl: Make NaClIPCAdapter transfer handles more generally (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ready for review? Created 8 years, 4 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: ppapi/shared_impl/ppb_audio_shared.cc
diff --git a/ppapi/shared_impl/ppb_audio_shared.cc b/ppapi/shared_impl/ppb_audio_shared.cc
index 1a62130a9cbeeaabfe169d16fc81b3a3478819dc..4d37b576a1cfbdc8c331fe0eb3612e5c6a04c3b2 100644
--- a/ppapi/shared_impl/ppb_audio_shared.cc
+++ b/ppapi/shared_impl/ppb_audio_shared.cc
@@ -93,7 +93,8 @@ void PPB_Audio_Shared::SetStreamInfo(
shared_memory_.reset(new base::SharedMemory(shared_memory_handle, false));
shared_memory_size_ = shared_memory_size;
- if (!shared_memory_->Map(TotalSharedMemorySizeInBytes(shared_memory_size_))) {
+ if (!shared_memory_->Map(TotalSharedMemorySizeInBytes(
+ static_cast<uint32>(shared_memory_size_)))) {
PpapiGlobals::Get()->LogWithSource(instance, PP_LOGLEVEL_WARNING, "",
"Failed to map shared memory for PPB_Audio_Shared.");
}
@@ -168,11 +169,12 @@ void PPB_Audio_Shared::Run() {
while (sizeof(pending_data) ==
socket_->Receive(&pending_data, sizeof(pending_data)) &&
pending_data != kPauseMark) {
- callback_(buffer, shared_memory_size_, user_data_);
+ callback_(buffer, static_cast<uint32_t>(shared_memory_size_), user_data_);
// Let the host know we are done.
- SetActualDataSizeInBytes(shared_memory_.get(), shared_memory_size_,
- shared_memory_size_);
+ SetActualDataSizeInBytes(shared_memory_.get(),
+ static_cast<uint32>(shared_memory_size_),
+ static_cast<uint32>(shared_memory_size_));
}
}

Powered by Google App Engine
This is Rietveld 408576698