diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-05 03:15:11 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-05 03:15:11 +0000 |
commit | d00be8da1524cd3694ea2b6053ef2899bbca3616 (patch) | |
tree | 0541e3d0fe6ac68010af71927bc91f613df7ebed /remoting/protocol | |
parent | 1db0b3573f76703384f4d3dc6a81930f04e81a63 (diff) | |
download | chromium_src-d00be8da1524cd3694ea2b6053ef2899bbca3616.zip chromium_src-d00be8da1524cd3694ea2b6053ef2899bbca3616.tar.gz chromium_src-d00be8da1524cd3694ea2b6053ef2899bbca3616.tar.bz2 |
Cleanup code that format session description.
Session description message contains version and codec even for disabled
channels. That's no longer necessary because all current hosts should ignore
these attributes for disabled channels.
BUG=144053
Review URL: https://chromiumcodereview.appspot.com/14624009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198339 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol')
-rw-r--r-- | remoting/protocol/content_description.cc | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/remoting/protocol/content_description.cc b/remoting/protocol/content_description.cc index 1ea74ee..65385f9 100644 --- a/remoting/protocol/content_description.cc +++ b/remoting/protocol/content_description.cc @@ -63,18 +63,14 @@ XmlElement* FormatChannelConfig(const ChannelConfig& config, result->AddAttr(QName(kDefaultNs, kTransportAttr), ValueToName(kTransports, config.transport)); - // TODO(sergeyu): Here we add version and codec attributes even when transport - // is set to NONE. This is needed for backward compatibility only. Fix this - // code once the current stable version is able to cope with missing version - // and codec attributes. - // crbug.com/144053 - - result->AddAttr(QName(kDefaultNs, kVersionAttr), - base::IntToString(config.version)); - - if (config.codec != ChannelConfig::CODEC_UNDEFINED) { - result->AddAttr(QName(kDefaultNs, kCodecAttr), - ValueToName(kCodecs, config.codec)); + if (config.transport != ChannelConfig::TRANSPORT_NONE) { + result->AddAttr(QName(kDefaultNs, kVersionAttr), + base::IntToString(config.version)); + + if (config.codec != ChannelConfig::CODEC_UNDEFINED) { + result->AddAttr(QName(kDefaultNs, kCodecAttr), + ValueToName(kCodecs, config.codec)); + } } return result; @@ -168,14 +164,6 @@ XmlElement* ContentDescription::ToXml() const { for (it = config()->audio_configs().begin(); it != config()->audio_configs().end(); ++it) { ChannelConfig config = *it; - if (config.transport == ChannelConfig::TRANSPORT_NONE) { - // Older client and host may expect the following values for for the - // version and codec for the NONE audio config. - // TODO(sergeyu): Remove this code once the current version supports. - // crbug.com/144053 - config.version = 2; - config.codec = ChannelConfig::CODEC_VERBATIM; - } root->AddElement(FormatChannelConfig(config, kAudioTag)); } |