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}
diff --git a/examples/androidnativeapi/jni/androidcallclient.cc b/examples/androidnativeapi/jni/androidcallclient.cc
index 4da20b9..f2cdbd0 100644
--- a/examples/androidnativeapi/jni/androidcallclient.cc
+++ b/examples/androidnativeapi/jni/androidcallclient.cc
@@ -53,7 +53,7 @@
       rtc::scoped_refptr<webrtc::PeerConnectionInterface> pc);
 
   void OnSuccess(webrtc::SessionDescriptionInterface* desc) override;
-  void OnFailure(const std::string& error) override;
+  void OnFailure(webrtc::RTCError error) override;
 
  private:
   const rtc::scoped_refptr<webrtc::PeerConnectionInterface> pc_;
@@ -69,7 +69,7 @@
     : public webrtc::SetSessionDescriptionObserver {
  public:
   void OnSuccess() override;
-  void OnFailure(const std::string& error) override;
+  void OnFailure(webrtc::RTCError error) override;
 };
 
 }  // namespace
@@ -260,8 +260,9 @@
       new rtc::RefCountedObject<SetRemoteSessionDescriptionObserver>());
 }
 
-void CreateOfferObserver::OnFailure(const std::string& error) {
-  RTC_LOG(LS_INFO) << "Failed to create offer: " << error;
+void CreateOfferObserver::OnFailure(webrtc::RTCError error) {
+  RTC_LOG(LS_INFO) << "Failed to create offer: " << ToString(error.type())
+                   << ": " << error.message();
 }
 
 void SetRemoteSessionDescriptionObserver::OnSetRemoteDescriptionComplete(
@@ -273,8 +274,9 @@
   RTC_LOG(LS_INFO) << "Set local description success!";
 }
 
-void SetLocalSessionDescriptionObserver::OnFailure(const std::string& error) {
-  RTC_LOG(LS_INFO) << "Set local description failure: " << error;
+void SetLocalSessionDescriptionObserver::OnFailure(webrtc::RTCError error) {
+  RTC_LOG(LS_INFO) << "Set local description failure: "
+                   << ToString(error.type()) << ": " << error.message();
 }
 
 static jlong JNI_CallClient_CreateClient(