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

Unified Diff: remoting/protocol/content_description.cc

Issue 1099203005: Revert of Use standard ICE in Chromoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/protocol/content_description.h ('k') | remoting/protocol/fake_connection_to_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/content_description.cc
diff --git a/remoting/protocol/content_description.cc b/remoting/protocol/content_description.cc
index a48c57b5febb908c4833674c5f7a480c41310d3b..5d8aaacb2be16ca464cf53b2766eb973a6a11e13 100644
--- a/remoting/protocol/content_description.cc
+++ b/remoting/protocol/content_description.cc
@@ -25,7 +25,6 @@
// 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::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* root = new XmlElement(
QName(kChromotingXmlNamespace, kDescriptionTag), true);
- if (config()->standard_ice()) {
- root->AddElement(
- new buzz::XmlElement(QName(kChromotingXmlNamespace, kStandardIceTag)));
- }
-
- for (const ChannelConfig& channel_config : config()->control_configs()) {
- root->AddElement(FormatChannelConfig(channel_config, kControlTag));
- }
-
- for (const ChannelConfig& channel_config : config()->event_configs()) {
- root->AddElement(FormatChannelConfig(channel_config, kEventTag));
- }
-
- for (const ChannelConfig& channel_config : config()->video_configs()) {
- root->AddElement(FormatChannelConfig(channel_config, kVideoTag));
- }
-
- for (const ChannelConfig& channel_config : config()->audio_configs()) {
- root->AddElement(FormatChannelConfig(channel_config, kAudioTag));
+ std::list<ChannelConfig>::const_iterator it;
+
+ for (it = config()->control_configs().begin();
+ it != config()->control_configs().end(); ++it) {
+ root->AddElement(FormatChannelConfig(*it, kControlTag));
+ }
+
+ for (it = config()->event_configs().begin();
+ it != config()->event_configs().end(); ++it) {
+ root->AddElement(FormatChannelConfig(*it, kEventTag));
+ }
+
+ for (it = config()->video_configs().begin();
+ it != config()->video_configs().end(); ++it) {
+ root->AddElement(FormatChannelConfig(*it, kVideoTag));
+ }
+
+ 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 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<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,
« no previous file with comments | « remoting/protocol/content_description.h ('k') | remoting/protocol/fake_connection_to_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698