| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "remoting/protocol/pepper_stream_channel.h" | 5 #include "remoting/protocol/pepper_stream_channel.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "crypto/hmac.h" | 8 #include "crypto/hmac.h" |
| 9 #include "jingle/glue/utils.h" | 9 #include "jingle/glue/utils.h" |
| 10 #include "net/base/cert_status_flags.h" | 10 #include "net/base/cert_status_flags.h" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 LOG(ERROR) << "Failed to set relay token."; | 136 LOG(ERROR) << "Failed to set relay token."; |
| 137 } | 137 } |
| 138 | 138 |
| 139 if (transport->SetProperty( | 139 if (transport->SetProperty( |
| 140 PP_TRANSPORTPROPERTY_RELAY_MODE, | 140 PP_TRANSPORTPROPERTY_RELAY_MODE, |
| 141 pp::Var(PP_TRANSPORTRELAYMODE_GOOGLE)) != PP_OK) { | 141 pp::Var(PP_TRANSPORTRELAYMODE_GOOGLE)) != PP_OK) { |
| 142 LOG(ERROR) << "Failed to set relay mode."; | 142 LOG(ERROR) << "Failed to set relay mode."; |
| 143 } | 143 } |
| 144 } | 144 } |
| 145 | 145 |
| 146 if (transport->SetProperty(PP_TRANSPORTPROPERTY_DISABLE_TCP_TRANSPORT, |
| 147 pp::Var(true)) != PP_OK) { |
| 148 LOG(ERROR) << "Failed to set DISABLE_TCP_TRANSPORT flag."; |
| 149 } |
| 150 |
| 146 channel_ = new PepperTransportSocketAdapter(transport, name_, this); | 151 channel_ = new PepperTransportSocketAdapter(transport, name_, this); |
| 147 owned_channel_.reset(channel_); | 152 owned_channel_.reset(channel_); |
| 148 | 153 |
| 149 int result = channel_->Connect(&p2p_connect_callback_); | 154 int result = channel_->Connect(&p2p_connect_callback_); |
| 150 if (result != net::ERR_IO_PENDING) | 155 if (result != net::ERR_IO_PENDING) |
| 151 OnP2PConnect(result); | 156 OnP2PConnect(result); |
| 152 } | 157 } |
| 153 | 158 |
| 154 void PepperStreamChannel::AddRemoveCandidate( | 159 void PepperStreamChannel::AddRemoveCandidate( |
| 155 const cricket::Candidate& candidate) { | 160 const cricket::Candidate& candidate) { |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 void PepperStreamChannel::NotifyConnectFailed() { | 267 void PepperStreamChannel::NotifyConnectFailed() { |
| 263 channel_ = NULL; | 268 channel_ = NULL; |
| 264 owned_channel_.reset(); | 269 owned_channel_.reset(); |
| 265 socket_.reset(); | 270 socket_.reset(); |
| 266 | 271 |
| 267 NotifyConnected(NULL); | 272 NotifyConnected(NULL); |
| 268 } | 273 } |
| 269 | 274 |
| 270 } // namespace protocol | 275 } // namespace protocol |
| 271 } // namespace remoting | 276 } // namespace remoting |
| OLD | NEW |