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

Side by Side Diff: webrtc/api/webrtcsessiondescriptionfactory.cc

Issue 2019423006: Adding more detail to MessageQueue::Dispatch logging. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 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 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2013 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 true) { 214 true) {
215 RTC_DCHECK(certificate); 215 RTC_DCHECK(certificate);
216 216
217 certificate_request_state_ = CERTIFICATE_WAITING; 217 certificate_request_state_ = CERTIFICATE_WAITING;
218 218
219 LOG(LS_VERBOSE) << "DTLS-SRTP enabled; has certificate parameter."; 219 LOG(LS_VERBOSE) << "DTLS-SRTP enabled; has certificate parameter.";
220 // We already have a certificate but we wait to do SetIdentity; if we do 220 // We already have a certificate but we wait to do SetIdentity; if we do
221 // it in the constructor then the caller has not had a chance to connect to 221 // it in the constructor then the caller has not had a chance to connect to
222 // SignalIdentityReady. 222 // SignalIdentityReady.
223 signaling_thread_->Post( 223 signaling_thread_->Post(
224 this, MSG_USE_CONSTRUCTOR_CERTIFICATE, 224 FROM_HERE, this, MSG_USE_CONSTRUCTOR_CERTIFICATE,
225 new rtc::ScopedRefMessageData<rtc::RTCCertificate>(certificate)); 225 new rtc::ScopedRefMessageData<rtc::RTCCertificate>(certificate));
226 } 226 }
227 227
228 WebRtcSessionDescriptionFactory::~WebRtcSessionDescriptionFactory() { 228 WebRtcSessionDescriptionFactory::~WebRtcSessionDescriptionFactory() {
229 ASSERT(signaling_thread_->IsCurrent()); 229 ASSERT(signaling_thread_->IsCurrent());
230 230
231 // Fail any requests that were asked for before identity generation completed. 231 // Fail any requests that were asked for before identity generation completed.
232 FailPendingRequests(kFailedDueToSessionShutdown); 232 FailPendingRequests(kFailedDueToSessionShutdown);
233 233
234 // Process all pending notifications in the message queue. If we don't do 234 // Process all pending notifications in the message queue. If we don't do
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 ((request.type == CreateSessionDescriptionRequest::kOffer) ? 469 ((request.type == CreateSessionDescriptionRequest::kOffer) ?
470 "CreateOffer" : "CreateAnswer") + reason); 470 "CreateOffer" : "CreateAnswer") + reason);
471 create_session_description_requests_.pop(); 471 create_session_description_requests_.pop();
472 } 472 }
473 } 473 }
474 474
475 void WebRtcSessionDescriptionFactory::PostCreateSessionDescriptionFailed( 475 void WebRtcSessionDescriptionFactory::PostCreateSessionDescriptionFailed(
476 CreateSessionDescriptionObserver* observer, const std::string& error) { 476 CreateSessionDescriptionObserver* observer, const std::string& error) {
477 CreateSessionDescriptionMsg* msg = new CreateSessionDescriptionMsg(observer); 477 CreateSessionDescriptionMsg* msg = new CreateSessionDescriptionMsg(observer);
478 msg->error = error; 478 msg->error = error;
479 signaling_thread_->Post(this, MSG_CREATE_SESSIONDESCRIPTION_FAILED, msg); 479 signaling_thread_->Post(FROM_HERE, this, MSG_CREATE_SESSIONDESCRIPTION_FAILED,
480 msg);
480 LOG(LS_ERROR) << "Create SDP failed: " << error; 481 LOG(LS_ERROR) << "Create SDP failed: " << error;
481 } 482 }
482 483
483 void WebRtcSessionDescriptionFactory::PostCreateSessionDescriptionSucceeded( 484 void WebRtcSessionDescriptionFactory::PostCreateSessionDescriptionSucceeded(
484 CreateSessionDescriptionObserver* observer, 485 CreateSessionDescriptionObserver* observer,
485 SessionDescriptionInterface* description) { 486 SessionDescriptionInterface* description) {
486 CreateSessionDescriptionMsg* msg = new CreateSessionDescriptionMsg(observer); 487 CreateSessionDescriptionMsg* msg = new CreateSessionDescriptionMsg(observer);
487 msg->description.reset(description); 488 msg->description.reset(description);
488 signaling_thread_->Post(this, MSG_CREATE_SESSIONDESCRIPTION_SUCCESS, msg); 489 signaling_thread_->Post(FROM_HERE, this,
490 MSG_CREATE_SESSIONDESCRIPTION_SUCCESS, msg);
489 } 491 }
490 492
491 void WebRtcSessionDescriptionFactory::OnIdentityRequestFailed(int error) { 493 void WebRtcSessionDescriptionFactory::OnIdentityRequestFailed(int error) {
492 ASSERT(signaling_thread_->IsCurrent()); 494 ASSERT(signaling_thread_->IsCurrent());
493 495
494 LOG(LS_ERROR) << "Async identity request failed: error = " << error; 496 LOG(LS_ERROR) << "Async identity request failed: error = " << error;
495 certificate_request_state_ = CERTIFICATE_FAILED; 497 certificate_request_state_ = CERTIFICATE_FAILED;
496 498
497 FailPendingRequests(kFailedDueToIdentityFailed); 499 FailPendingRequests(kFailedDueToIdentityFailed);
498 } 500 }
(...skipping 13 matching lines...) Expand all
512 if (create_session_description_requests_.front().type == 514 if (create_session_description_requests_.front().type ==
513 CreateSessionDescriptionRequest::kOffer) { 515 CreateSessionDescriptionRequest::kOffer) {
514 InternalCreateOffer(create_session_description_requests_.front()); 516 InternalCreateOffer(create_session_description_requests_.front());
515 } else { 517 } else {
516 InternalCreateAnswer(create_session_description_requests_.front()); 518 InternalCreateAnswer(create_session_description_requests_.front());
517 } 519 }
518 create_session_description_requests_.pop(); 520 create_session_description_requests_.pop();
519 } 521 }
520 } 522 }
521 } // namespace webrtc 523 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698