| Index: remoting/protocol/session_config.cc
|
| diff --git a/remoting/protocol/session_config.cc b/remoting/protocol/session_config.cc
|
| index f3b2e038ec3fd1c24932265a37b8dda68a006741..6113552e4cb12ca4851b65fe032fe23b53e6a0c3 100644
|
| --- a/remoting/protocol/session_config.cc
|
| +++ b/remoting/protocol/session_config.cc
|
| @@ -11,8 +11,10 @@ namespace protocol {
|
|
|
| const int kDefaultStreamVersion = 2;
|
|
|
| -ChannelConfig::ChannelConfig() {
|
| - Reset();
|
| +ChannelConfig::ChannelConfig()
|
| + : transport(TRANSPORT_NONE),
|
| + version(0),
|
| + codec(CODEC_UNDEFINED) {
|
| }
|
|
|
| ChannelConfig::ChannelConfig(TransportType transport, int version, Codec codec)
|
| @@ -22,15 +24,12 @@ ChannelConfig::ChannelConfig(TransportType transport, int version, Codec codec)
|
| }
|
|
|
| bool ChannelConfig::operator==(const ChannelConfig& b) const {
|
| + // If the transport field is set to NONE then all other fields are irrelevant.
|
| + if (transport == ChannelConfig::TRANSPORT_NONE)
|
| + return transport == b.transport;
|
| return transport == b.transport && version == b.version && codec == b.codec;
|
| }
|
|
|
| -void ChannelConfig::Reset() {
|
| - transport = TRANSPORT_STREAM;
|
| - version = kDefaultStreamVersion;
|
| - codec = CODEC_UNDEFINED;
|
| -}
|
| -
|
| SessionConfig::SessionConfig() {
|
| }
|
|
|
| @@ -205,10 +204,7 @@ scoped_ptr<CandidateSessionConfig> CandidateSessionConfig::CreateDefault() {
|
| kDefaultStreamVersion,
|
| ChannelConfig::CODEC_VERBATIM));
|
| #endif // defined(ENABLE_REMOTING_AUDIO)
|
| - result->mutable_audio_configs()->push_back(
|
| - ChannelConfig(ChannelConfig::TRANSPORT_NONE,
|
| - kDefaultStreamVersion,
|
| - ChannelConfig::CODEC_VERBATIM));
|
| + result->mutable_audio_configs()->push_back(ChannelConfig());
|
| return result.Pass();
|
| }
|
|
|
|
|