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

Side by Side Diff: content/browser/media/media_internals.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/media/media_internals.h" 5 #include "content/browser/media/media_internals.h"
6 6
7 #include "base/strings/string16.h" 7 #include "base/strings/string16.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 20 matching lines...) Expand all
31 struct { 31 struct {
32 int flag; 32 int flag;
33 const char* name; 33 const char* name;
34 } flags[] = { 34 } flags[] = {
35 { media::AudioParameters::ECHO_CANCELLER, "ECHO_CANCELLER" }, 35 { media::AudioParameters::ECHO_CANCELLER, "ECHO_CANCELLER" },
36 { media::AudioParameters::DUCKING, "DUCKING" }, 36 { media::AudioParameters::DUCKING, "DUCKING" },
37 { media::AudioParameters::KEYBOARD_MIC, "KEYBOARD_MIC" }, 37 { media::AudioParameters::KEYBOARD_MIC, "KEYBOARD_MIC" },
38 }; 38 };
39 39
40 std::string ret; 40 std::string ret;
41 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(flags); ++i) { 41 for (size_t i = 0; i < arraysize(flags); ++i) {
42 if (effects & flags[i].flag) { 42 if (effects & flags[i].flag) {
43 if (!ret.empty()) 43 if (!ret.empty())
44 ret += " | "; 44 ret += " | ";
45 ret += flags[i].name; 45 ret += flags[i].name;
46 effects &= ~flags[i].flag; 46 effects &= ~flags[i].flag;
47 } 47 }
48 } 48 }
49 49
50 if (effects) { 50 if (effects) {
51 if (!ret.empty()) 51 if (!ret.empty())
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 const std::string& function, 292 const std::string& function,
293 const base::DictionaryValue* value) { 293 const base::DictionaryValue* value) {
294 SendUpdate(SerializeUpdate(function, value)); 294 SendUpdate(SerializeUpdate(function, value));
295 295
296 base::AutoLock auto_lock(lock_); 296 base::AutoLock auto_lock(lock_);
297 scoped_ptr<base::Value> out_value; 297 scoped_ptr<base::Value> out_value;
298 CHECK(audio_streams_cached_data_.Remove(cache_key, &out_value)); 298 CHECK(audio_streams_cached_data_.Remove(cache_key, &out_value));
299 } 299 }
300 300
301 } // namespace content 301 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/fileapi/sandbox_file_system_backend_unittest.cc ('k') | content/browser/quota/quota_database_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698