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

Unified Diff: content/renderer/media/media_stream_audio_processor_options.cc

Issue 654403002: Convert ARRAYSIZE_UNSAFE -> arraysize in content/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/media/media_stream_audio_processor_options.cc
diff --git a/content/renderer/media/media_stream_audio_processor_options.cc b/content/renderer/media/media_stream_audio_processor_options.cc
index e386308fed94fe0a86fcba7e906066ef8f14cb21..50eb6e2e6038ef43c4e36197840b0c121d6a1e66 100644
--- a/content/renderer/media/media_stream_audio_processor_options.cc
+++ b/content/renderer/media/media_stream_audio_processor_options.cc
@@ -78,7 +78,7 @@ bool IsAudioProcessingConstraint(const std::string& key) {
// TODO(xians): Remove this method after the APM in WebRtc is deprecated.
void MediaAudioConstraints::ApplyFixedAudioConstraints(
RTCMediaConstraints* constraints) {
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kDefaultAudioConstraints); ++i) {
+ for (size_t i = 0; i < arraysize(kDefaultAudioConstraints); ++i) {
bool already_set_value;
if (!webrtc::FindConstraint(constraints, kDefaultAudioConstraints[i].key,
&already_set_value, NULL)) {
@@ -119,7 +119,7 @@ bool MediaAudioConstraints::NeedsAudioProcessing() {
if (GetEchoCancellationProperty())
return true;
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kDefaultAudioConstraints); ++i) {
+ for (size_t i = 0; i < arraysize(kDefaultAudioConstraints); ++i) {
// |kEchoCancellation| and |kGoogEchoCancellation| have been convered by
// GetEchoCancellationProperty().
if (kDefaultAudioConstraints[i].key != kEchoCancellation &&
@@ -169,7 +169,7 @@ bool MediaAudioConstraints::IsValid() {
}
bool valid = false;
- for (size_t j = 0; j < ARRAYSIZE_UNSAFE(kDefaultAudioConstraints); ++j) {
+ for (size_t j = 0; j < arraysize(kDefaultAudioConstraints); ++j) {
if (key == kDefaultAudioConstraints[j].key) {
bool value = false;
valid = GetMandatoryConstraintValueAsBoolean(constraints_, key, &value);
@@ -195,7 +195,7 @@ bool MediaAudioConstraints::GetDefaultValueForConstraint(
IsAudioProcessingConstraint(key))
return false;
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kDefaultAudioConstraints); ++i) {
+ for (size_t i = 0; i < arraysize(kDefaultAudioConstraints); ++i) {
if (kDefaultAudioConstraints[i].key == key)
return kDefaultAudioConstraints[i].value;
}
« no previous file with comments | « content/common/sandbox_mac_diraccess_unittest.mm ('k') | content/renderer/media/webrtc/peer_connection_dependency_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698