| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |