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

Unified Diff: third_party/libxml/chromium/include/libxml/libxml_utils.h

Issue 10251004: Move libxml_utils from chrome/common to third_party/libxml/chromium. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move to third_party/libxml/chromium. Created 8 years, 8 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: third_party/libxml/chromium/include/libxml/libxml_utils.h
diff --git a/chrome/common/libxml_utils.h b/third_party/libxml/chromium/include/libxml/libxml_utils.h
similarity index 88%
rename from chrome/common/libxml_utils.h
rename to third_party/libxml/chromium/include/libxml/libxml_utils.h
index cf53341949df763719c33074ad56a4c370b46a63..ea1f2fd3e8fac6d66790a985e0097a609a8e027d 100644
--- a/chrome/common/libxml_utils.h
+++ b/third_party/libxml/chromium/include/libxml/libxml_utils.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// 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.
-#ifndef CHROME_COMMON_LIBXML_UTILS_H__
-#define CHROME_COMMON_LIBXML_UTILS_H__
+#ifndef __XML_LIBXML_UTILS_H__
jam 2012/05/04 06:36:35 nit: this should be THIRD_PARTY_LIBXML_CHROMIUM_IN
dtu 2012/05/07 22:59:11 Done.
+#define __XML_LIBXML_UTILS_H__
#pragma once
#include <string>
@@ -11,8 +11,6 @@
#include "libxml/xmlreader.h"
#include "libxml/xmlwriter.h"
-class FilePath;
-
// Converts a libxml xmlChar* into a UTF-8 std::string.
// NULL inputs produce an empty string.
std::string XmlStringToStdString(const xmlChar* xmlstring);
@@ -49,7 +47,7 @@ class XmlReader {
bool Load(const std::string& input);
// Load a document into the reader from a file. Returns false on error.
- bool LoadFile(const FilePath& file_path);
+ bool LoadFile(const std::string& file_path);
// Wrappers around libxml functions -----------------------------------------
@@ -90,24 +88,12 @@ class XmlReader {
// If currently on an opening tag, doesn't advance at all.
bool SkipToElement();
- // Returns the errors reported by libxml, if any.
- // (libxml normally just dumps these errors to stderr.)
- const std::string& errors() const { return errors_; }
-
private:
- // A callback for libxml to report errors.
- static void GenericErrorCallback(void* context, const char* msg, ...);
-
// Returns the libxml node type of the current node.
int NodeType() { return xmlTextReaderNodeType(reader_); }
// The underlying libxml xmlTextReader.
xmlTextReaderPtr reader_;
-
- // error_func_ is used to reassign libxml's global error function
- // to report errors into |errors_| for the lifetime of this object.
- ScopedXmlErrorFunc error_func_;
- std::string errors_;
};
// XmlWriter is a wrapper class around libxml's xmlWriter,
@@ -182,4 +168,5 @@ class XmlWriter {
xmlBufferPtr buffer_;
};
-#endif // CHROME_COMMON_LIBXML_UTILS_H__
+#endif // __XML_LIBXML_UTILS_H__
+

Powered by Google App Engine
This is Rietveld 408576698