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

Unified Diff: content/browser/renderer_host/media/audio_sync_reader.cc

Issue 10124004: Reland 10000004 - Make the CancellableSyncSocket non-blocking on Send, and blocking on Receive (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed Tommi's comment and remove that line of code instead. Created 8 years, 8 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 | « content/browser/renderer_host/media/audio_sync_reader.h ('k') | ipc/sync_socket_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/audio_sync_reader.cc
diff --git a/content/browser/renderer_host/media/audio_sync_reader.cc b/content/browser/renderer_host/media/audio_sync_reader.cc
index 7b6664bbf49f81b8daa41ab455feb50f21a89e93..de121df3fc26dd0c9b65c2010af426b1822655cb 100644
--- a/content/browser/renderer_host/media/audio_sync_reader.cc
+++ b/content/browser/renderer_host/media/audio_sync_reader.cc
@@ -36,7 +36,7 @@ void AudioSyncReader::UpdatePendingBytes(uint32 bytes) {
shared_memory_,
media::PacketSizeSizeInBytes(shared_memory_->created_size()));
}
- base::AutoLock auto_lock(lock_);
+
if (socket_.get()) {
socket_->Send(&bytes, sizeof(bytes));
}
@@ -84,10 +84,8 @@ uint32 AudioSyncReader::Read(void* data, uint32 size) {
}
void AudioSyncReader::Close() {
- base::AutoLock auto_lock(lock_);
if (socket_.get()) {
socket_->Close();
- socket_.reset(NULL);
}
}
« no previous file with comments | « content/browser/renderer_host/media/audio_sync_reader.h ('k') | ipc/sync_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698