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

Side by Side Diff: jingle/notifier/listener/xml_element_util.cc

Issue 2443903004: Add xmllite and xmpp sources to third_party/ (Closed)
Patch Set: Explicitly use webrtc_overrides/webrtc/base/logging.h Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "jingle/notifier/listener/xml_element_util.h" 5 #include "jingle/notifier/listener/xml_element_util.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 #include <string> 8 #include <string>
9 9
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
11 #include "third_party/webrtc/libjingle/xmllite/qname.h" 11 #include "third_party/libjingle_xmpp/xmllite/qname.h"
12 #include "third_party/webrtc/libjingle/xmllite/xmlconstants.h" 12 #include "third_party/libjingle_xmpp/xmllite/xmlconstants.h"
13 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" 13 #include "third_party/libjingle_xmpp/xmllite/xmlelement.h"
14 #include "third_party/webrtc/libjingle/xmllite/xmlprinter.h" 14 #include "third_party/libjingle_xmpp/xmllite/xmlprinter.h"
15 15
16 namespace notifier { 16 namespace notifier {
17 17
18 std::string XmlElementToString(const buzz::XmlElement& xml_element) { 18 std::string XmlElementToString(const buzz::XmlElement& xml_element) {
19 std::ostringstream xml_stream; 19 std::ostringstream xml_stream;
20 buzz::XmlPrinter::PrintXml(&xml_stream, &xml_element); 20 buzz::XmlPrinter::PrintXml(&xml_stream, &xml_element);
21 return xml_stream.str(); 21 return xml_stream.str();
22 } 22 }
23 23
24 buzz::XmlElement* MakeBoolXmlElement(const char* name, bool value) { 24 buzz::XmlElement* MakeBoolXmlElement(const char* name, bool value) {
(...skipping 17 matching lines...) Expand all
42 buzz::XmlElement* MakeStringXmlElement(const char* name, const char* value) { 42 buzz::XmlElement* MakeStringXmlElement(const char* name, const char* value) {
43 const buzz::QName elementQName(buzz::STR_EMPTY, name); 43 const buzz::QName elementQName(buzz::STR_EMPTY, name);
44 const buzz::QName dataAttrQName(buzz::STR_EMPTY, "data"); 44 const buzz::QName dataAttrQName(buzz::STR_EMPTY, "data");
45 buzz::XmlElement* data_xml_element = 45 buzz::XmlElement* data_xml_element =
46 new buzz::XmlElement(elementQName, true); 46 new buzz::XmlElement(elementQName, true);
47 data_xml_element->AddAttr(dataAttrQName, value); 47 data_xml_element->AddAttr(dataAttrQName, value);
48 return data_xml_element; 48 return data_xml_element;
49 } 49 }
50 50
51 } // namespace notifier 51 } // namespace notifier
OLDNEW
« no previous file with comments | « jingle/notifier/listener/send_ping_task_unittest.cc ('k') | jingle/notifier/listener/xml_element_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698