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

Side by Side Diff: chromeos/dbus/audio_node.cc

Issue 1320923005: Fill in mic_positions property. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « chromeos/dbus/audio_node.h ('k') | chromeos/dbus/cras_audio_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/dbus/audio_node.h" 5 #include "chromeos/dbus/audio_node.h"
6 6
7 #include "base/format_macros.h" 7 #include "base/format_macros.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 10
(...skipping 15 matching lines...) Expand all
26 uint64 plugged_time) 26 uint64 plugged_time)
27 : is_input(is_input), 27 : is_input(is_input),
28 id(id), 28 id(id),
29 device_name(device_name), 29 device_name(device_name),
30 type(type), 30 type(type),
31 name(name), 31 name(name),
32 active(active), 32 active(active),
33 plugged_time(plugged_time) { 33 plugged_time(plugged_time) {
34 } 34 }
35 35
36 AudioNode::~AudioNode() {}
37
36 std::string AudioNode::ToString() const { 38 std::string AudioNode::ToString() const {
37 std::string result; 39 std::string result;
38 base::StringAppendF(&result, 40 base::StringAppendF(&result,
39 "is_input = %s ", 41 "is_input = %s ",
40 is_input ? "true" : "false"); 42 is_input ? "true" : "false");
41 base::StringAppendF(&result, 43 base::StringAppendF(&result,
42 "id = 0x%" PRIx64 " ", 44 "id = 0x%" PRIx64 " ",
43 id); 45 id);
44 base::StringAppendF(&result, 46 base::StringAppendF(&result,
45 "device_name = %s ", 47 "device_name = %s ",
46 device_name.c_str()); 48 device_name.c_str());
47 base::StringAppendF(&result, 49 base::StringAppendF(&result,
48 "type = %s ", 50 "type = %s ",
49 type.c_str()); 51 type.c_str());
50 base::StringAppendF(&result, 52 base::StringAppendF(&result,
51 "name = %s ", 53 "name = %s ",
52 name.c_str()); 54 name.c_str());
53 base::StringAppendF(&result, 55 base::StringAppendF(&result,
54 "active = %s ", 56 "active = %s ",
55 active ? "true" : "false"); 57 active ? "true" : "false");
56 base::StringAppendF(&result, 58 base::StringAppendF(&result,
57 "plugged_time= %s ", 59 "plugged_time= %s ",
58 base::Uint64ToString(plugged_time).c_str()); 60 base::Uint64ToString(plugged_time).c_str());
59 61
60 return result; 62 return result;
61 } 63 }
62 64
63 } // namespace chromeos 65 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/audio_node.h ('k') | chromeos/dbus/cras_audio_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698