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

Unified Diff: chrome/browser/chromeos/dbus/introspectable_client.cc

Issue 9839064: chromeos: Separate XML parsing code from IntrospectableClient (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/dbus/introspectable_client.cc
diff --git a/chrome/browser/chromeos/dbus/introspectable_client.cc b/chrome/browser/chromeos/dbus/introspectable_client.cc
index 508e1da20ff0eca2516df6ee6ca7e3b3514d1394..4a26dd2e911a28f5f2e6113e5fbe39b840a98366 100644
--- a/chrome/browser/chromeos/dbus/introspectable_client.cc
+++ b/chrome/browser/chromeos/dbus/introspectable_client.cc
@@ -10,7 +10,6 @@
#include "base/bind.h"
#include "base/logging.h"
#include "base/chromeos/chromeos_version.h"
-#include "chrome/common/libxml_utils.h"
#include "dbus/bus.h"
#include "dbus/message.h"
#include "dbus/object_path.h"
@@ -22,10 +21,6 @@ namespace {
const char kIntrospectableInterface[] = "org.freedesktop.DBus.Introspectable";
const char kIntrospect[] = "Introspect";
-// String constants used for parsing D-Bus Introspection XML data.
-const char kInterfaceNode[] = "interface";
-const char kInterfaceNameAttribute[] = "name";
-
} // namespace
namespace chromeos {
@@ -111,38 +106,6 @@ IntrospectableClient::~IntrospectableClient() {
}
// static
-std::vector<std::string> IntrospectableClient::GetInterfacesFromXmlData(
- const std::string&xml_data) {
- std::vector<std::string> interfaces;
-
- XmlReader reader;
- if (!reader.Load(xml_data))
- return interfaces;
-
- do {
- // Skip to the next open tag, exit when done.
- while (!reader.SkipToElement()) {
- if (!reader.Read()) {
- return interfaces;
- }
- }
-
- // Only look at interface nodes.
- if (reader.NodeName() != kInterfaceNode)
- continue;
-
- // Skip if missing the interface name.
- std::string interface_name;
- if (!reader.NodeAttribute(kInterfaceNameAttribute, &interface_name))
- continue;
-
- interfaces.push_back(interface_name);
- } while (reader.Read());
-
- return interfaces;
-}
-
-// static
IntrospectableClient* IntrospectableClient::Create(dbus::Bus* bus) {
if (base::chromeos::IsRunningOnChromeOS()) {
return new IntrospectableClientImpl(bus);
« no previous file with comments | « chrome/browser/chromeos/dbus/introspectable_client.h ('k') | chrome/browser/chromeos/dbus/introspectable_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698