| 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 "chrome/browser/chromeos/dbus/introspectable_client.h" | 5 #include "chrome/browser/chromeos/dbus/introspectable_client.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "chrome/browser/chromeos/system/runtime_environment.h" | 12 #include "base/chromeos/chromeos_version.h" |
| 13 #include "chrome/common/libxml_utils.h" | 13 #include "chrome/common/libxml_utils.h" |
| 14 #include "dbus/bus.h" | 14 #include "dbus/bus.h" |
| 15 #include "dbus/message.h" | 15 #include "dbus/message.h" |
| 16 #include "dbus/object_path.h" | 16 #include "dbus/object_path.h" |
| 17 #include "dbus/object_proxy.h" | 17 #include "dbus/object_proxy.h" |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 // D-Bus specification constants. | 21 // D-Bus specification constants. |
| 22 const char kIntrospectableInterface[] = "org.freedesktop.DBus.Introspectable"; | 22 const char kIntrospectableInterface[] = "org.freedesktop.DBus.Introspectable"; |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 continue; | 137 continue; |
| 138 | 138 |
| 139 interfaces.push_back(interface_name); | 139 interfaces.push_back(interface_name); |
| 140 } while (reader.Read()); | 140 } while (reader.Read()); |
| 141 | 141 |
| 142 return interfaces; | 142 return interfaces; |
| 143 } | 143 } |
| 144 | 144 |
| 145 // static | 145 // static |
| 146 IntrospectableClient* IntrospectableClient::Create(dbus::Bus* bus) { | 146 IntrospectableClient* IntrospectableClient::Create(dbus::Bus* bus) { |
| 147 if (system::runtime_environment::IsRunningOnChromeOS()) { | 147 if (base::chromeos::IsRunningOnChromeOS()) { |
| 148 return new IntrospectableClientImpl(bus); | 148 return new IntrospectableClientImpl(bus); |
| 149 } else { | 149 } else { |
| 150 return new IntrospectableClientStubImpl(); | 150 return new IntrospectableClientStubImpl(); |
| 151 } | 151 } |
| 152 } | 152 } |
| 153 | 153 |
| 154 } // namespace chromeos | 154 } // namespace chromeos |
| OLD | NEW |