Commit 0116cf53 authored by sergeyu@chromium.org's avatar sergeyu@chromium.org

Roll libjingle 88:92

Beside other changes the new version of libjingle has 
thread-safe QName class and has all std::string and QName 
statics removed.

BUG=94993,102451
TEST=Compiles


Review URL: http://codereview.chromium.org/8413059

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108065 0039d316-1c4b-4281-b951-d872f2087c98
parent 94f29e2e
...@@ -26,7 +26,7 @@ vars = { ...@@ -26,7 +26,7 @@ vars = {
"596aa5b812ec4b24160ed7ce55b3fd141f929fbf", "596aa5b812ec4b24160ed7ce55b3fd141f929fbf",
"nacl_toolchain_revision": "6757", "nacl_toolchain_revision": "6757",
"libjingle_revision": "88", "libjingle_revision": "92",
"libvpx_revision": "107145", "libvpx_revision": "107145",
"ffmpeg_revision": "107500", "ffmpeg_revision": "107500",
"sfntly_revision": "98", "sfntly_revision": "98",
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include <string.h> #include <string.h>
#include "base/logging.h" #include "base/logging.h"
#include "third_party/libjingle/overrides/talk/xmllite/qname.h" #include "third_party/libjingle/source/talk/xmllite/qname.h"
AutofillXmlParser::AutofillXmlParser() AutofillXmlParser::AutofillXmlParser()
: succeeded_(true) { : succeeded_(true) {
......
...@@ -117,6 +117,7 @@ ...@@ -117,6 +117,7 @@
'../testing/gmock.gyp:gmock', '../testing/gmock.gyp:gmock',
'../testing/gtest.gyp:gtest', '../testing/gtest.gyp:gtest',
'../third_party/libjingle/libjingle.gyp:libjingle', '../third_party/libjingle/libjingle.gyp:libjingle',
'../third_party/libjingle/libjingle.gyp:libjingle_peerconnection',
'../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit', '../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit',
'../ui/gfx/gl/gl.gyp:gl', '../ui/gfx/gl/gl.gyp:gl',
'../ui/ui.gyp:ui', '../ui/ui.gyp:ui',
......
...@@ -34,9 +34,9 @@ class GaiaCookieMechanism : public buzz::SaslCookieMechanism { ...@@ -34,9 +34,9 @@ class GaiaCookieMechanism : public buzz::SaslCookieMechanism {
const std::string NS_GOOGLE_AUTH_PROTOCOL( const std::string NS_GOOGLE_AUTH_PROTOCOL(
"http://www.google.com/talk/protocol/auth"); "http://www.google.com/talk/protocol/auth");
const buzz::QName QN_GOOGLE_ALLOW_GENERATED_JID_XMPP_LOGIN( const buzz::QName QN_GOOGLE_ALLOW_GENERATED_JID_XMPP_LOGIN(
true, NS_GOOGLE_AUTH_PROTOCOL, "allow-generated-jid"); NS_GOOGLE_AUTH_PROTOCOL, "allow-generated-jid");
const buzz::QName QN_GOOGLE_AUTH_CLIENT_USES_FULL_BIND_RESULT( const buzz::QName QN_GOOGLE_AUTH_CLIENT_USES_FULL_BIND_RESULT(
true, NS_GOOGLE_AUTH_PROTOCOL, "client-uses-full-bind-result"); NS_GOOGLE_AUTH_PROTOCOL, "client-uses-full-bind-result");
auth->SetAttr(QN_GOOGLE_ALLOW_GENERATED_JID_XMPP_LOGIN, "true"); auth->SetAttr(QN_GOOGLE_ALLOW_GENERATED_JID_XMPP_LOGIN, "true");
auth->SetAttr(QN_GOOGLE_AUTH_CLIENT_USES_FULL_BIND_RESULT, "true"); auth->SetAttr(QN_GOOGLE_AUTH_CLIENT_USES_FULL_BIND_RESULT, "true");
return auth; return auth;
......
...@@ -114,7 +114,7 @@ void HeartbeatSender::ProcessResponse(const XmlElement* response) { ...@@ -114,7 +114,7 @@ void HeartbeatSender::ProcessResponse(const XmlElement* response) {
} }
// This method must only be called for error or result stanzas. // This method must only be called for error or result stanzas.
DCHECK_EQ(buzz::STR_RESULT, type); DCHECK_EQ(std::string(buzz::STR_RESULT), type);
const XmlElement* result_element = const XmlElement* result_element =
response->FirstNamed(QName(kChromotingXmlNamespace, kHeartbeatResultTag)); response->FirstNamed(QName(kChromotingXmlNamespace, kHeartbeatResultTag));
......
...@@ -129,7 +129,7 @@ bool RegisterSupportHostRequest::ParseResponse(const XmlElement* response, ...@@ -129,7 +129,7 @@ bool RegisterSupportHostRequest::ParseResponse(const XmlElement* response,
} }
// This method must only be called for error or result stanzas. // This method must only be called for error or result stanzas.
DCHECK_EQ(buzz::STR_RESULT, type); DCHECK_EQ(std::string(buzz::STR_RESULT), type);
const XmlElement* result_element = response->FirstNamed(QName( const XmlElement* result_element = response->FirstNamed(QName(
kChromotingXmlNamespace, kRegisterQueryResultTag)); kChromotingXmlNamespace, kRegisterQueryResultTag));
......
...@@ -351,7 +351,7 @@ buzz::XmlElement* JingleMessageReply::ToXml( ...@@ -351,7 +351,7 @@ buzz::XmlElement* JingleMessageReply::ToXml(
std::string type; std::string type;
std::string error_text; std::string error_text;
QName name; QName name("");
switch (error_type) { switch (error_type) {
case BAD_REQUEST: case BAD_REQUEST:
type = "modify"; type = "modify";
......
...@@ -156,12 +156,6 @@ ...@@ -156,12 +156,6 @@
'overrides/talk/base/scoped_ptr.h', 'overrides/talk/base/scoped_ptr.h',
# Libjingle's QName is not threadsafe, so we need to use our own version
# here.
# TODO(sergeyu): Fix QName in Libjingle.
'overrides/talk/xmllite/qname.cc',
'overrides/talk/xmllite/qname.h',
'source/talk/base/Equifax_Secure_Global_eBusiness_CA-1.h', 'source/talk/base/Equifax_Secure_Global_eBusiness_CA-1.h',
'source/talk/base/asyncfile.cc', 'source/talk/base/asyncfile.cc',
'source/talk/base/asyncfile.h', 'source/talk/base/asyncfile.h',
...@@ -281,6 +275,8 @@ ...@@ -281,6 +275,8 @@
'source/talk/base/urlencode.h', 'source/talk/base/urlencode.h',
'source/talk/base/worker.cc', 'source/talk/base/worker.cc',
'source/talk/base/worker.h', 'source/talk/base/worker.h',
'source/talk/xmllite/qname.cc',
'source/talk/xmllite/qname.h',
'source/talk/xmllite/xmlbuilder.cc', 'source/talk/xmllite/xmlbuilder.cc',
'source/talk/xmllite/xmlbuilder.h', 'source/talk/xmllite/xmlbuilder.h',
'source/talk/xmllite/xmlconstants.cc', 'source/talk/xmllite/xmlconstants.cc',
...@@ -448,7 +444,7 @@ ...@@ -448,7 +444,7 @@
{ {
'target_name': 'libjingle_peerconnection', 'target_name': 'libjingle_peerconnection',
'type': 'static_library', 'type': 'static_library',
'sources': [ 'sources': [
'source/talk/app/webrtc/peerconnection.h', 'source/talk/app/webrtc/peerconnection.h',
'source/talk/app/webrtc/peerconnectionfactory.cc', 'source/talk/app/webrtc/peerconnectionfactory.cc',
'source/talk/app/webrtc/peerconnectionfactory.h', 'source/talk/app/webrtc/peerconnectionfactory.h',
...@@ -473,13 +469,15 @@ ...@@ -473,13 +469,15 @@
'source/talk/session/phone/cryptoparams.h', 'source/talk/session/phone/cryptoparams.h',
'source/talk/session/phone/currentspeakermonitor.cc', 'source/talk/session/phone/currentspeakermonitor.cc',
'source/talk/session/phone/currentspeakermonitor.h', 'source/talk/session/phone/currentspeakermonitor.h',
'source/talk/session/phone/devicemanager.cc', # See http://crbug.com/102012
'source/talk/session/phone/devicemanager.h', # 'source/talk/session/phone/devicemanager.cc',
# 'source/talk/session/phone/devicemanager.h',
'source/talk/session/phone/filemediaengine.cc', 'source/talk/session/phone/filemediaengine.cc',
'source/talk/session/phone/filemediaengine.h', 'source/talk/session/phone/filemediaengine.h',
'source/talk/session/phone/mediachannel.h', 'source/talk/session/phone/mediachannel.h',
'source/talk/session/phone/mediaengine.cc', # See http://crbug.com/102451
'source/talk/session/phone/mediaengine.h', # 'source/talk/session/phone/mediaengine.cc',
# 'source/talk/session/phone/mediaengine.h',
'source/talk/session/phone/mediamessages.cc', 'source/talk/session/phone/mediamessages.cc',
'source/talk/session/phone/mediamessages.h', 'source/talk/session/phone/mediamessages.h',
'source/talk/session/phone/mediamonitor.cc', 'source/talk/session/phone/mediamonitor.cc',
...@@ -490,21 +488,25 @@ ...@@ -490,21 +488,25 @@
'source/talk/session/phone/mediasessionclient.h', 'source/talk/session/phone/mediasessionclient.h',
'source/talk/session/phone/mediasink.h', 'source/talk/session/phone/mediasink.h',
'source/talk/session/phone/rtcpmuxfilter.cc', 'source/talk/session/phone/rtcpmuxfilter.cc',
'source/talk/session/phone/rtcpmuxfilter.h', 'source/talk/session/phone/rtcpmuxfilter.h',
'source/talk/session/phone/rtpdump.cc', 'source/talk/session/phone/rtpdump.cc',
'source/talk/session/phone/rtpdump.h', 'source/talk/session/phone/rtpdump.h',
'source/talk/session/phone/rtputils.cc', 'source/talk/session/phone/rtputils.cc',
'source/talk/session/phone/rtputils.h', 'source/talk/session/phone/rtputils.h',
'source/talk/session/phone/soundclip.cc', 'source/talk/session/phone/soundclip.cc',
'source/talk/session/phone/soundclip.h', 'source/talk/session/phone/soundclip.h',
'source/talk/session/phone/srtpfilter.cc', # See http://crbug.com/102451
'source/talk/session/phone/srtpfilter.h', # 'source/talk/session/phone/srtpfilter.cc',
# 'source/talk/session/phone/srtpfilter.h',
'source/talk/session/phone/videocommon.h', 'source/talk/session/phone/videocommon.h',
'source/talk/session/phone/videoframe.cc',
'source/talk/session/phone/videoframe.h',
'source/talk/session/phone/voicechannel.h', 'source/talk/session/phone/voicechannel.h',
'source/talk/session/phone/webrtccommon.h', 'source/talk/session/phone/webrtccommon.h',
'source/talk/session/phone/webrtcpassthroughrender.cc', 'source/talk/session/phone/webrtcpassthroughrender.cc',
'source/talk/session/phone/webrtcvideoengine.cc', # See http://crbug.com/102451
'source/talk/session/phone/webrtcvideoengine.h', # 'source/talk/session/phone/webrtcvideoengine.cc',
# 'source/talk/session/phone/webrtcvideoengine.h',
'source/talk/session/phone/webrtcvideoframe.cc', 'source/talk/session/phone/webrtcvideoframe.cc',
'source/talk/session/phone/webrtcvideoframe.h', 'source/talk/session/phone/webrtcvideoframe.h',
'source/talk/session/phone/webrtcvie.h', 'source/talk/session/phone/webrtcvie.h',
...@@ -520,7 +522,7 @@ ...@@ -520,7 +522,7 @@
'<(DEPTH)/third_party/webrtc/system_wrappers/source/system_wrappers.gyp:system_wrappers', '<(DEPTH)/third_party/webrtc/system_wrappers/source/system_wrappers.gyp:system_wrappers',
'libjingle', 'libjingle',
'libjingle_p2p', 'libjingle_p2p',
], ],
}, # target libjingle_peerconnection }, # target libjingle_peerconnection
], ],
} }
// Copyright (c) 2010 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 "talk/xmllite/qname.h"
#include "talk/base/common.h"
#include "talk/xmllite/xmlelement.h"
#include "talk/xmllite/xmlconstants.h"
namespace buzz {
QName::QName() : namespace_(QN_EMPTY.namespace_),
local_part_(QN_EMPTY.local_part_) {}
QName::QName(const std::string & ns, const std::string & local) :
namespace_(ns), local_part_(local) {}
QName::QName(bool add, const std::string & ns, const std::string & local) :
namespace_(ns), local_part_(local) {}
static std::string
QName_LocalPart(const std::string & name) {
size_t i = name.rfind(':');
if (i == std::string::npos)
return name;
return name.substr(i + 1);
}
static std::string
QName_Namespace(const std::string & name) {
size_t i = name.rfind(':');
if (i == std::string::npos)
return STR_EMPTY;
return name.substr(0, i);
}
QName::QName(const std::string & mergedOrLocal) :
namespace_(QName_Namespace(mergedOrLocal)),
local_part_(QName_LocalPart(mergedOrLocal)) {}
std::string
QName::Merged() const {
if (namespace_ == STR_EMPTY)
return local_part_;
return namespace_ + ':' + local_part_;
}
bool
QName::operator==(const QName & other) const {
return
local_part_ == other.local_part_ &&
namespace_ == other.namespace_;
}
int
QName::Compare(const QName & other) const {
int result = local_part_.compare(other.local_part_);
if (result)
return result;
return namespace_.compare(other.namespace_);
}
} // namespace buzz
// Copyright (c) 2010 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 TALK_XMLLITE_QNAME_H_
#define TALK_XMLLITE_QNAME_H_
#include <string>
namespace buzz {
// Default libjingle's implementation of QName class is not threadsafe. This
// one is.
class QName
{
public:
QName();
QName(const std::string & ns, const std::string & local);
QName(bool add, const std::string & ns, const std::string & local);
explicit QName(const std::string & mergedOrLocal);
const std::string & Namespace() const { return namespace_; }
const std::string & LocalPart() const { return local_part_; }
std::string Merged() const;
int Compare(const QName & other) const;
bool operator==(const QName & other) const;
bool operator!=(const QName & other) const { return !operator==(other); }
bool operator<(const QName & other) const { return Compare(other) < 0; }
private:
std::string namespace_;
std::string local_part_;
};
} // namespace buzz
#endif // TALK_XMLLITE_QNAME_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment