Index: chrome/browser/media_galleries/fileapi/itunes_xml_utils.h |
diff --git a/chrome/browser/media_galleries/fileapi/itunes_xml_utils.h b/chrome/browser/media_galleries/fileapi/itunes_xml_utils.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f77ff97f8ce055e98fc3c362b5f7cc490a6c9be9 |
--- /dev/null |
+++ b/chrome/browser/media_galleries/fileapi/itunes_xml_utils.h |
@@ -0,0 +1,27 @@ |
+// Copyright (c) 2013 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. |
+ |
+#ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ITUNES_XML_UTILS_H_ |
+#define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ITUNES_XML_UTILS_H_ |
+ |
+#include <string> |
+ |
+class XmlReader; |
+ |
+namespace itunes { |
+ |
+// Like XmlReader::SkipToElement, but will advance to the next open tag if the |
+// cursor is on a close tag. |
+bool SkipToNextElement(XmlReader* reader); |
+ |
+// Traverse |reader| looking for a node named |name| at the current depth |
+// of |reader|. |
+bool SeekToNodeAtCurrentDepth(XmlReader* reader, const std::string& name); |
+ |
+// Search within the dict for |key|. |
bryeung
2013/06/03 17:34:16
A comment about pre-conditions would be nice here
vandebo (ex-Chrome)
2013/06/03 17:46:52
Done.
It's a plist XML, so I didn't really descri
bryeung
2013/06/03 17:49:22
sgtm, thanks
|
+bool SeekInDict(XmlReader* reader, const std::string& key); |
+ |
+} // namespace itunes |
+ |
+#endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_ITUNES_XML_UTILS_H_ |