summaryrefslogtreecommitdiffstats
path: root/remoting/protocol/content_description.cc
diff options
context:
space:
mode:
authorsergeyu <sergeyu@chromium.org>2015-04-23 10:44:11 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-23 17:44:28 +0000
commitda3ba0c9e7d2f0ae81f4d89097a6df56b3ec0df1 (patch)
tree86d9897125f1ef05a9095b8ca49fe2997b59d8e2 /remoting/protocol/content_description.cc
parent0df00e0661defe6707ad888dd9146aa25bfed63a (diff)
downloadchromium_src-da3ba0c9e7d2f0ae81f4d89097a6df56b3ec0df1.zip
chromium_src-da3ba0c9e7d2f0ae81f4d89097a6df56b3ec0df1.tar.gz
chromium_src-da3ba0c9e7d2f0ae81f4d89097a6df56b3ec0df1.tar.bz2
Revert of Use standard ICE in Chromoting. (patchset #7 id:160001 of https://codereview.chromium.org/1085703003/)
Reason for revert: This change did cause test failure: http://build.chromium.org/p/chromium.memory.fyi/builders/Chromium%20Mac%20%28valgrind%29%282%29/builds/34169/ (the link in the first revert was incorrect) Original issue's description: > Use standard ICE in Chromoting. > > Previously we were using legacy, non-standard version of ICE. This > change adds ICE version negotiation and enabled standard ICE by default, > when both peers support it. > > BUG=473758 > > Committed: https://crrev.com/5a5854ee3e1c5760b422f26d31909bfb5dca631f > Cr-Commit-Position: refs/heads/master@{#326560} TBR=rmsousa@chromium.org,wez@chromium.org,dcaiafa@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=473758 Review URL: https://codereview.chromium.org/1089253005 Cr-Commit-Position: refs/heads/master@{#326570}
Diffstat (limited to 'remoting/protocol/content_description.cc')
-rw-r--r--remoting/protocol/content_description.cc42
1 files changed, 23 insertions, 19 deletions
diff --git a/remoting/protocol/content_description.cc b/remoting/protocol/content_description.cc
index a48c57b..5d8aaac 100644
--- a/remoting/protocol/content_description.cc
+++ b/remoting/protocol/content_description.cc
@@ -25,7 +25,6 @@ const char kDefaultNs[] = "";
// Following constants are used to format session description in XML.
const char kDescriptionTag[] = "description";
-const char kStandardIceTag[] = "standard-ice";
const char kControlTag[] = "control";
const char kEventTag[] = "event";
const char kVideoTag[] = "video";
@@ -122,10 +121,17 @@ ContentDescription::ContentDescription(
ContentDescription::~ContentDescription() { }
+ContentDescription* ContentDescription::Copy() const {
+ if (!candidate_config_.get() || !authenticator_message_.get()) {
+ return nullptr;
+ }
+ scoped_ptr<XmlElement> message(new XmlElement(*authenticator_message_));
+ return new ContentDescription(candidate_config_->Clone(), message.Pass());
+}
+
// ToXml() creates content description for chromoting session. The
// description looks as follows:
// <description xmlns="google:remoting">
-// <standard-ice/>
// <control transport="stream" version="1" />
// <event transport="datagram" version="1" />
// <video transport="stream" codec="vp8" version="1" />
@@ -139,25 +145,27 @@ XmlElement* ContentDescription::ToXml() const {
XmlElement* root = new XmlElement(
QName(kChromotingXmlNamespace, kDescriptionTag), true);
- if (config()->standard_ice()) {
- root->AddElement(
- new buzz::XmlElement(QName(kChromotingXmlNamespace, kStandardIceTag)));
- }
+ std::list<ChannelConfig>::const_iterator it;
- for (const ChannelConfig& channel_config : config()->control_configs()) {
- root->AddElement(FormatChannelConfig(channel_config, kControlTag));
+ for (it = config()->control_configs().begin();
+ it != config()->control_configs().end(); ++it) {
+ root->AddElement(FormatChannelConfig(*it, kControlTag));
}
- for (const ChannelConfig& channel_config : config()->event_configs()) {
- root->AddElement(FormatChannelConfig(channel_config, kEventTag));
+ for (it = config()->event_configs().begin();
+ it != config()->event_configs().end(); ++it) {
+ root->AddElement(FormatChannelConfig(*it, kEventTag));
}
- for (const ChannelConfig& channel_config : config()->video_configs()) {
- root->AddElement(FormatChannelConfig(channel_config, kVideoTag));
+ for (it = config()->video_configs().begin();
+ it != config()->video_configs().end(); ++it) {
+ root->AddElement(FormatChannelConfig(*it, kVideoTag));
}
- for (const ChannelConfig& channel_config : config()->audio_configs()) {
- root->AddElement(FormatChannelConfig(channel_config, kAudioTag));
+ for (it = config()->audio_configs().begin();
+ it != config()->audio_configs().end(); ++it) {
+ ChannelConfig config = *it;
+ root->AddElement(FormatChannelConfig(config, kAudioTag));
}
// Older endpoints require an initial-resolution tag, but otherwise ignore it.
@@ -184,6 +192,7 @@ bool ContentDescription::ParseChannelConfigs(
bool codec_required,
bool optional,
std::list<ChannelConfig>* const configs) {
+
QName tag(kChromotingXmlNamespace, tag_name);
const XmlElement* child = element->FirstNamed(tag);
while (child) {
@@ -209,11 +218,6 @@ scoped_ptr<ContentDescription> ContentDescription::ParseXml(
}
scoped_ptr<CandidateSessionConfig> config(
CandidateSessionConfig::CreateEmpty());
-
- config->set_standard_ice(
- element->FirstNamed(QName(kChromotingXmlNamespace, kStandardIceTag)) !=
- nullptr);
-
if (!ParseChannelConfigs(element, kControlTag, false, false,
config->mutable_control_configs()) ||
!ParseChannelConfigs(element, kEventTag, false, false,