OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chromeos/audio/audio_device.h" | 5 #include "chromeos/audio/audio_device.h" |
6 | 6 |
7 #include "base/format_macros.h" | 7 #include "base/format_macros.h" |
8 #include "base/stringprintf.h" | |
9 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/strings/stringprintf.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 | 11 |
12 namespace { | 12 namespace { |
13 | 13 |
14 // Get the priority for a particular device type. The priority returned | 14 // Get the priority for a particular device type. The priority returned |
15 // will be between 0 to 3, the higher number meaning a higher priority. | 15 // will be between 0 to 3, the higher number meaning a higher priority. |
16 uint8 GetDevicePriority(chromeos::AudioDeviceType type) { | 16 uint8 GetDevicePriority(chromeos::AudioDeviceType type) { |
17 switch (type) { | 17 switch (type) { |
18 // Fall through. | 18 // Fall through. |
19 case chromeos::AUDIO_TYPE_HEADPHONE: | 19 case chromeos::AUDIO_TYPE_HEADPHONE: |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 "active = %s ", | 118 "active = %s ", |
119 active ? "true" : "false"); | 119 active ? "true" : "false"); |
120 base::StringAppendF(&result, | 120 base::StringAppendF(&result, |
121 "plugged_time= %s ", | 121 "plugged_time= %s ", |
122 base::Uint64ToString(plugged_time).c_str()); | 122 base::Uint64ToString(plugged_time).c_str()); |
123 | 123 |
124 return result; | 124 return result; |
125 } | 125 } |
126 | 126 |
127 } // namespace chromeos | 127 } // namespace chromeos |
OLD | NEW |