| 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/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
| 8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 } | 65 } |
| 66 | 66 |
| 67 std::string FormatToString(media::AudioParameters::Format format) { | 67 std::string FormatToString(media::AudioParameters::Format format) { |
| 68 switch (format) { | 68 switch (format) { |
| 69 case media::AudioParameters::AUDIO_PCM_LINEAR: | 69 case media::AudioParameters::AUDIO_PCM_LINEAR: |
| 70 return "pcm_linear"; | 70 return "pcm_linear"; |
| 71 case media::AudioParameters::AUDIO_PCM_LOW_LATENCY: | 71 case media::AudioParameters::AUDIO_PCM_LOW_LATENCY: |
| 72 return "pcm_low_latency"; | 72 return "pcm_low_latency"; |
| 73 case media::AudioParameters::AUDIO_FAKE: | 73 case media::AudioParameters::AUDIO_FAKE: |
| 74 return "fake"; | 74 return "fake"; |
| 75 case media::AudioParameters::AUDIO_LAST_FORMAT: | |
| 76 break; | |
| 77 } | 75 } |
| 78 | 76 |
| 79 NOTREACHED(); | 77 NOTREACHED(); |
| 80 return "unknown"; | 78 return "unknown"; |
| 81 } | 79 } |
| 82 | 80 |
| 83 const char kAudioLogStatusKey[] = "status"; | 81 const char kAudioLogStatusKey[] = "status"; |
| 84 const char kAudioLogUpdateFunction[] = "media.updateAudioComponent"; | 82 const char kAudioLogUpdateFunction[] = "media.updateAudioComponent"; |
| 85 | 83 |
| 86 } // namespace | 84 } // namespace |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 audio_streams_cached_data_.GetDictionary(cache_key, &existing_dict)); | 669 audio_streams_cached_data_.GetDictionary(cache_key, &existing_dict)); |
| 672 existing_dict->MergeDictionary(value); | 670 existing_dict->MergeDictionary(value); |
| 673 } | 671 } |
| 674 } | 672 } |
| 675 | 673 |
| 676 if (CanUpdate()) | 674 if (CanUpdate()) |
| 677 SendUpdate(SerializeUpdate(function, value)); | 675 SendUpdate(SerializeUpdate(function, value)); |
| 678 } | 676 } |
| 679 | 677 |
| 680 } // namespace content | 678 } // namespace content |
| OLD | NEW |