X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fchrome%2Fbrowser%2Fcomponent_updater%2Fupdate_response.cc;h=2b5a98e99afed1c37bb521e10ad81ac6ca775c2d;hb=004985e17e624662a4c85c76a7654039dc83f028;hp=cf936588c82f3f1473792c783f23b7bcc9a436c0;hpb=2f108dbacb161091e42a3479f4e171339b7e7623;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/chrome/browser/component_updater/update_response.cc b/src/chrome/browser/component_updater/update_response.cc index cf93658..2b5a98e 100644 --- a/src/chrome/browser/component_updater/update_response.cc +++ b/src/chrome/browser/component_updater/update_response.cc @@ -68,8 +68,8 @@ static std::string GetAttribute(xmlNode* node, const char* attribute_name) { for (xmlAttr* attr = node->properties; attr != NULL; attr = attr->next) { if (!xmlStrcmp(attr->name, name) && attr->children && attr->children->content) { - return std::string(reinterpret_cast( - attr->children->content)); + return std::string( + reinterpret_cast(attr->children->content)); } } return std::string(); @@ -77,7 +77,7 @@ static std::string GetAttribute(xmlNode* node, const char* attribute_name) { // This is used for the xml parser to report errors. This assumes the context // is a pointer to a std::string where the error message should be appended. -static void XmlErrorFunc(void *context, const char *message, ...) { +static void XmlErrorFunc(void* context, const char* message, ...) { va_list args; va_start(args, message); std::string* error = static_cast(context); @@ -94,9 +94,7 @@ class ScopedXmlDocument { xmlFreeDoc(document_); } - xmlDocPtr get() { - return document_; - } + xmlDocPtr get() { return document_; } private: xmlDocPtr document_; @@ -283,8 +281,8 @@ bool UpdateResponse::Parse(const std::string& response_xml) { ScopedXmlErrorFunc error_func(&xml_errors, &XmlErrorFunc); // Start up the xml parser with the manifest_xml contents. - ScopedXmlDocument document(xmlParseDoc( - reinterpret_cast(response_xml.c_str()))); + ScopedXmlDocument document( + xmlParseDoc(reinterpret_cast(response_xml.c_str()))); if (!document.get()) { ParseError("%s", xml_errors.c_str()); return false; @@ -303,8 +301,10 @@ bool UpdateResponse::Parse(const std::string& response_xml) { // Check for the response "protocol" attribute. if (GetAttribute(root, "protocol") != kExpectedResponseProtocol) { - ParseError("Missing/incorrect protocol on response tag " - "(expected '%s')", kExpectedResponseProtocol); + ParseError( + "Missing/incorrect protocol on response tag " + "(expected '%s')", + kExpectedResponseProtocol); return false; } @@ -335,4 +335,3 @@ bool UpdateResponse::Parse(const std::string& response_xml) { } } // namespace component_updater -