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

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

Issue 294803003: Do not call SendMessageToNativeLog on Android in AudioInputSyncWriter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp
Patch Set: Created 6 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/audio_input_sync_writer.cc
diff --git a/content/browser/renderer_host/media/audio_input_sync_writer.cc b/content/browser/renderer_host/media/audio_input_sync_writer.cc
index b9c8ee5e3b6d19c3a84acfbd1b695872c2baf4c1..168027fce6ef17202572a124e809fd8657486533 100644
--- a/content/browser/renderer_host/media/audio_input_sync_writer.cc
+++ b/content/browser/renderer_host/media/audio_input_sync_writer.cc
@@ -8,8 +8,7 @@
#include "base/memory/shared_memory.h"
#include "content/browser/renderer_host/media/media_stream_manager.h"
-
-static const uint32 kLogDelayThreadholdMs = 500;
+#include "content/public/browser/browser_thread.h"
Feng Qian 2014/05/21 18:23:30 This is unnecessary now.
jiayl 2014/05/21 18:29:21 Done.
namespace content {
@@ -37,6 +36,9 @@ uint32 AudioInputSyncWriter::Write(const void* data,
uint32 size,
double volume,
bool key_pressed) {
+#if !defined(OS_ANDROID)
+ static const uint32 kLogDelayThreadholdMs = 500;
+
std::ostringstream oss;
if (last_write_time_.is_null()) {
// This is the first time Write is called.
@@ -50,10 +52,12 @@ uint32 AudioInputSyncWriter::Write(const void* data,
<< interval.InMilliseconds() << "ms.";
}
}
- if (!oss.str().empty())
+ if (!oss.str().empty()) {
Feng Qian 2014/05/21 18:23:30 remove {}
jiayl 2014/05/21 18:29:21 Done.
MediaStreamManager::SendMessageToNativeLog(oss.str());
+ }
last_write_time_ = base::Time::Now();
+#endif
uint8* ptr = static_cast<uint8*>(shared_memory_->memory());
ptr += current_segment_id_ * shared_memory_segment_size_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698