Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chromeos/dbus/audio_node.h" | |
| 6 | |
| 7 #include "base/format_macros.h" | |
| 8 #include "base/stringprintf.h" | |
| 9 | |
| 10 namespace chromeos { | |
| 11 | |
| 12 AudioNode::AudioNode() | |
| 13 : is_input(false), | |
| 14 id(0), | |
| 15 active(false) { | |
| 16 } | |
| 17 | |
| 18 std::string AudioNode::ToString() const { | |
| 19 std::string result; | |
| 20 base::StringAppendF(&result, | |
| 21 "is_input = %s ", | |
| 22 is_input ? "true" : "false"); | |
| 23 base::StringAppendF(&result, | |
| 24 "id = %" PRIu64" ", | |
|
stevenjb
2013/04/10 20:27:13
nit: no ' ' before PRIu64
jennyz
2013/04/10 20:56:28
Done.
| |
| 25 id); | |
| 26 base::StringAppendF(&result, | |
| 27 "device_name = %s ", | |
| 28 device_name.c_str()); | |
| 29 base::StringAppendF(&result, | |
| 30 "type = %s ", | |
| 31 type.c_str()); | |
| 32 base::StringAppendF(&result, | |
| 33 "name = %s ", | |
| 34 name.c_str()); | |
| 35 base::StringAppendF(&result, | |
| 36 "active = %s ", | |
| 37 active ? "true" : "false"); | |
| 38 | |
| 39 return result; | |
| 40 } | |
| 41 | |
| 42 } // namespace chromeos | |
| OLD | NEW |