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

Side by Side Diff: content/browser/renderer_host/media/media_stream_manager.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/media/media_stream_manager.h" 5 #include "content/browser/renderer_host/media/media_stream_manager.h"
6 6
7 #include <list> 7 #include <list>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 1077
1078 void MediaStreamManager::StartEnumeration(DeviceRequest* request) { 1078 void MediaStreamManager::StartEnumeration(DeviceRequest* request) {
1079 DCHECK_CURRENTLY_ON(BrowserThread::IO); 1079 DCHECK_CURRENTLY_ON(BrowserThread::IO);
1080 1080
1081 // Start monitoring the devices when doing the first enumeration. 1081 // Start monitoring the devices when doing the first enumeration.
1082 StartMonitoring(); 1082 StartMonitoring();
1083 1083
1084 // Start enumeration for devices of all requested device types. 1084 // Start enumeration for devices of all requested device types.
1085 const MediaStreamType streams[] = { request->audio_type(), 1085 const MediaStreamType streams[] = { request->audio_type(),
1086 request->video_type() }; 1086 request->video_type() };
1087 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(streams); ++i) { 1087 for (size_t i = 0; i < arraysize(streams); ++i) {
1088 if (streams[i] == MEDIA_NO_SERVICE) 1088 if (streams[i] == MEDIA_NO_SERVICE)
1089 continue; 1089 continue;
1090 request->SetState(streams[i], MEDIA_REQUEST_STATE_REQUESTED); 1090 request->SetState(streams[i], MEDIA_REQUEST_STATE_REQUESTED);
1091 DCHECK_GE(active_enumeration_ref_count_[streams[i]], 0); 1091 DCHECK_GE(active_enumeration_ref_count_[streams[i]], 0);
1092 if (active_enumeration_ref_count_[streams[i]] == 0) { 1092 if (active_enumeration_ref_count_[streams[i]] == 0) {
1093 ++active_enumeration_ref_count_[streams[i]]; 1093 ++active_enumeration_ref_count_[streams[i]];
1094 GetDeviceManager(streams[i])->EnumerateDevices(streams[i]); 1094 GetDeviceManager(streams[i])->EnumerateDevices(streams[i]);
1095 } 1095 }
1096 } 1096 }
1097 } 1097 }
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
2116 } 2116 }
2117 } 2117 }
2118 2118
2119 void MediaStreamManager::SetKeyboardMicOnDeviceThread() { 2119 void MediaStreamManager::SetKeyboardMicOnDeviceThread() {
2120 DCHECK(device_task_runner_->BelongsToCurrentThread()); 2120 DCHECK(device_task_runner_->BelongsToCurrentThread());
2121 audio_manager_->SetHasKeyboardMic(); 2121 audio_manager_->SetHasKeyboardMic();
2122 } 2122 }
2123 #endif 2123 #endif
2124 2124
2125 } // namespace content 2125 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/quota/quota_manager_unittest.cc ('k') | content/browser/webui/web_ui_data_source_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698