summaryrefslogtreecommitdiffstats
path: root/third_party/libjingle/overrides
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-01 02:44:32 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-01 02:44:32 +0000
commit0116cf53e569e1c10db7febaf2ce027ce1e19d4a (patch)
tree6da1fcee56c6676e5ea2e39b78655f021eff70b8 /third_party/libjingle/overrides
parent94f29e2e1d6758af5a6e726bde12394e3f9b8f28 (diff)
downloadchromium_src-0116cf53e569e1c10db7febaf2ce027ce1e19d4a.zip
chromium_src-0116cf53e569e1c10db7febaf2ce027ce1e19d4a.tar.gz
chromium_src-0116cf53e569e1c10db7febaf2ce027ce1e19d4a.tar.bz2
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
Diffstat (limited to 'third_party/libjingle/overrides')
-rw-r--r--third_party/libjingle/overrides/talk/xmllite/qname.cc65
-rw-r--r--third_party/libjingle/overrides/talk/xmllite/qname.h37
2 files changed, 0 insertions, 102 deletions
diff --git a/third_party/libjingle/overrides/talk/xmllite/qname.cc b/third_party/libjingle/overrides/talk/xmllite/qname.cc
deleted file mode 100644
index 5c9e62d..0000000
--- a/third_party/libjingle/overrides/talk/xmllite/qname.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-// 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
diff --git a/third_party/libjingle/overrides/talk/xmllite/qname.h b/third_party/libjingle/overrides/talk/xmllite/qname.h
deleted file mode 100644
index db80efb..0000000
--- a/third_party/libjingle/overrides/talk/xmllite/qname.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// 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_