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

Side by Side Diff: webrtc/p2p/client/httpportallocator.cc

Issue 1308753003: Revert "Reland "Remove GICE (gone forever!) and PORTALLOCATOR_ENABLE_SHARED_UFRAG (enabled forever)… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 LOG(LS_INFO) << "HTTPPortAllocator: sending to relay host " << host; 161 LOG(LS_INFO) << "HTTPPortAllocator: sending to relay host " << host;
162 if (relay_token_.empty()) { 162 if (relay_token_.empty()) {
163 LOG(LS_WARNING) << "No relay auth token found."; 163 LOG(LS_WARNING) << "No relay auth token found.";
164 } 164 }
165 165
166 SendSessionRequest(host, rtc::HTTP_SECURE_PORT); 166 SendSessionRequest(host, rtc::HTTP_SECURE_PORT);
167 } 167 }
168 168
169 std::string HttpPortAllocatorSessionBase::GetSessionRequestUrl() { 169 std::string HttpPortAllocatorSessionBase::GetSessionRequestUrl() {
170 std::string url = std::string(HttpPortAllocator::kCreateSessionURL); 170 std::string url = std::string(HttpPortAllocator::kCreateSessionURL);
171 ASSERT(!username().empty()); 171 if (allocator()->flags() & PORTALLOCATOR_ENABLE_SHARED_UFRAG) {
172 ASSERT(!password().empty()); 172 ASSERT(!username().empty());
173 url = url + "?username=" + rtc::s_url_encode(username()) + 173 ASSERT(!password().empty());
174 "&password=" + rtc::s_url_encode(password()); 174 url = url + "?username=" + rtc::s_url_encode(username()) +
175 "&password=" + rtc::s_url_encode(password());
176 }
175 return url; 177 return url;
176 } 178 }
177 179
178 void HttpPortAllocatorSessionBase::ReceiveSessionResponse( 180 void HttpPortAllocatorSessionBase::ReceiveSessionResponse(
179 const std::string& response) { 181 const std::string& response) {
180 182
181 StringMap map; 183 StringMap map;
182 ParseMap(response, map); 184 ParseMap(response, map);
183 185
184 if (!username().empty() && map["username"] != username()) { 186 if (!username().empty() && map["username"] != username()) {
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 rtc::MemoryStream* stream = 317 rtc::MemoryStream* stream =
316 static_cast<rtc::MemoryStream*>(request->response().document.get()); 318 static_cast<rtc::MemoryStream*>(request->response().document.get());
317 stream->Rewind(); 319 stream->Rewind();
318 size_t length; 320 size_t length;
319 stream->GetSize(&length); 321 stream->GetSize(&length);
320 std::string resp = std::string(stream->GetBuffer(), length); 322 std::string resp = std::string(stream->GetBuffer(), length);
321 ReceiveSessionResponse(resp); 323 ReceiveSessionResponse(resp);
322 } 324 }
323 325
324 } // namespace cricket 326 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698