Only grant permissions to new extensions from sync if they have the expected version
[chromium-blink-merge.git] / chromeos / dbus / audio_node.cc
blobc29ffb8753ad94e881388699aaafad9c1a248a67
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.
5 #include "chromeos/dbus/audio_node.h"
7 #include "base/format_macros.h"
8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/stringprintf.h"
11 namespace chromeos {
13 AudioNode::AudioNode()
14 : is_input(false),
15 id(0),
16 active(false),
17 plugged_time(0) {
20 AudioNode::AudioNode(bool is_input,
21 uint64 id,
22 std::string device_name,
23 std::string type,
24 std::string name,
25 bool active,
26 uint64 plugged_time)
27 : is_input(is_input),
28 id(id),
29 device_name(device_name),
30 type(type),
31 name(name),
32 active(active),
33 plugged_time(plugged_time) {
36 AudioNode::~AudioNode() {}
38 std::string AudioNode::ToString() const {
39 std::string result;
40 base::StringAppendF(&result,
41 "is_input = %s ",
42 is_input ? "true" : "false");
43 base::StringAppendF(&result,
44 "id = 0x%" PRIx64 " ",
45 id);
46 base::StringAppendF(&result,
47 "device_name = %s ",
48 device_name.c_str());
49 base::StringAppendF(&result,
50 "type = %s ",
51 type.c_str());
52 base::StringAppendF(&result,
53 "name = %s ",
54 name.c_str());
55 base::StringAppendF(&result,
56 "active = %s ",
57 active ? "true" : "false");
58 base::StringAppendF(&result,
59 "plugged_time= %s ",
60 base::Uint64ToString(plugged_time).c_str());
62 return result;
65 } // namespace chromeos