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

Unified Diff: media/audio/audio_device_thread.cc

Issue 1492403002: Remove kuint32max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: http security header file Created 5 years 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 | « media/audio/audio_device_thread.h ('k') | media/audio/audio_output_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_device_thread.cc
diff --git a/media/audio/audio_device_thread.cc b/media/audio/audio_device_thread.cc
index 9447293979415cccca39977c937f55c0d9f4f576..81dab87cd327fd19b0755af04f63beb939a883d9 100644
--- a/media/audio/audio_device_thread.cc
+++ b/media/audio/audio_device_thread.cc
@@ -4,7 +4,10 @@
#include "media/audio/audio_device_thread.h"
+#include <stdint.h>
+
#include <algorithm>
+#include <limits>
#include "base/bind.h"
#include "base/logging.h"
@@ -163,21 +166,22 @@ void AudioDeviceThread::Thread::ThreadMain() {
}
void AudioDeviceThread::Thread::Run() {
- uint32 buffer_index = 0;
+ uint32_t buffer_index = 0;
while (true) {
- uint32 pending_data = 0;
+ uint32_t pending_data = 0;
size_t bytes_read = socket_.Receive(&pending_data, sizeof(pending_data));
if (bytes_read != sizeof(pending_data))
break;
- // kuint32max is a special signal which is returned after the browser
- // stops the output device in response to a renderer side request.
+ // std::numeric_limits<uint32_t>::max() is a special signal which is
+ // returned after the browser stops the output device in response to a
+ // renderer side request.
//
// Avoid running Process() for the paused signal, we still need to update
// the buffer index if |synchronized_buffers_| is true though.
//
// See comments in AudioOutputController::DoPause() for details on why.
- if (pending_data != kuint32max) {
+ if (pending_data != std::numeric_limits<uint32_t>::max()) {
base::AutoLock auto_lock(callback_lock_);
if (callback_)
callback_->Process(pending_data);
« no previous file with comments | « media/audio/audio_device_thread.h ('k') | media/audio/audio_output_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698