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

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

Issue 10440013: Move chromeos::GetInterfacesFromIntrospectResult into IntrospectableClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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/introspect_util.cc
diff --git a/chrome/browser/chromeos/dbus/introspect_util.cc b/chrome/browser/chromeos/dbus/introspect_util.cc
deleted file mode 100644
index 997fd7b6d2ec644b93e50db6d21c46b712631d41..0000000000000000000000000000000000000000
--- a/chrome/browser/chromeos/dbus/introspect_util.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/chromeos/dbus/introspect_util.h"
-
-#include "third_party/libxml/chromium/libxml_utils.h"
-
-namespace {
-
-// String constants used for parsing D-Bus Introspection XML data.
-const char kInterfaceNode[] = "interface";
-const char kInterfaceNameAttribute[] = "name";
-
-}
-
-namespace chromeos {
-
-std::vector<std::string> GetInterfacesFromIntrospectResult(
- 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;
-}
-
-}
« no previous file with comments | « chrome/browser/chromeos/dbus/introspect_util.h ('k') | chrome/browser/chromeos/dbus/introspect_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698