Prepare to remove old OnFailure implementations

This removes usage of the old OnFailure methods on CreateSessionDescriptionObserver
and SetSessionDescriptionObserver, so that WebRTC will continue to compile
once all the default implementations are removed.

Bug: chromium:589455
Change-Id: Id67295b3ad0c30d24d79589c2041acdd507a19f3
Reviewed-on: https://webrtc-review.googlesource.com/78480
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23427}
This commit is contained in:
Harald Alvestrand
2018-05-24 10:53:49 +02:00
committed by Commit Bot
parent 26bc6695cd
commit 73771a893f
10 changed files with 49 additions and 41 deletions

View File

@ -61,9 +61,10 @@ class CreateSessionDescriptionObserverAdapter
completion_handler_ = nil;
}
void OnFailure(const std::string& error) override {
void OnFailure(RTCError error) override {
RTC_DCHECK(completion_handler_);
NSString* str = [NSString stringForStdString:error];
// TODO(hta): Add handling of error.type()
NSString *str = [NSString stringForStdString:error.message()];
NSError* err =
[NSError errorWithDomain:kRTCPeerConnectionErrorDomain
code:kRTCPeerConnnectionSessionDescriptionError
@ -95,9 +96,10 @@ class SetSessionDescriptionObserverAdapter :
completion_handler_ = nil;
}
void OnFailure(const std::string& error) override {
void OnFailure(RTCError error) override {
RTC_DCHECK(completion_handler_);
NSString* str = [NSString stringForStdString:error];
// TODO(hta): Add handling of error.type()
NSString *str = [NSString stringForStdString:error.message()];
NSError* err =
[NSError errorWithDomain:kRTCPeerConnectionErrorDomain
code:kRTCPeerConnnectionSessionDescriptionError