Index: services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor_apptest.cc |
diff --git a/services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor_apptest.cc b/services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor_apptest.cc |
index 20da6a63264fb0669faaa7193b7f8070a5d4d877..ba342ac4cdd41de921b476f3dad402e52bfd5af0 100644 |
--- a/services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor_apptest.cc |
+++ b/services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor_apptest.cc |
@@ -12,7 +12,6 @@ |
#include "mojo/public/cpp/application/application_connection.h" |
#include "mojo/public/cpp/application/application_impl.h" |
#include "mojo/public/cpp/application/application_test_base.h" |
-#include "mojo/public/cpp/bindings/error_handler.h" |
#include "mojo/public/cpp/bindings/strong_binding.h" |
#include "mojo/public/cpp/system/data_pipe.h" |
#include "mojo/services/authenticating_url_loader_interceptor/public/interfaces/authenticating_url_loader_interceptor_meta_factory.mojom.h" |
@@ -34,8 +33,7 @@ const char kAuthenticationScope[] = |
const char kAuthenticationHeaderName[] = "Authorization"; |
const char kAuthenticationHeaderValuePrefix[] = "Bearer"; |
-class MockAuthenticationService : public authentication::AuthenticationService, |
- public ErrorHandler { |
+class MockAuthenticationService : public authentication::AuthenticationService { |
public: |
MockAuthenticationService( |
mojo::InterfaceRequest<authentication::AuthenticationService> request) |
@@ -47,7 +45,9 @@ class MockAuthenticationService : public authentication::AuthenticationService, |
close_pipe_on_user_selection_(false), |
return_error_on_user_selection_(false), |
return_error_on_token_retrieval_(false) { |
- binding_.set_error_handler(this); |
+ // The AuthenticationService should never be closed from the other side in |
+ // these tests. |
+ binding_.set_connection_error_handler([this]() { DCHECK(0); }); |
} |
~MockAuthenticationService() override {} |
@@ -107,13 +107,6 @@ class MockAuthenticationService : public authentication::AuthenticationService, |
use_fresh_token_ = true; |
} |
- // ErrorHandler implementation |
- void OnConnectionError() override { |
- // The AuthenticationService should never be closed from the other side in |
- // these tests. |
- DCHECK(0); |
- } |
- |
Binding<authentication::AuthenticationService> binding_; |
uint32_t num_select_account_calls_; |
uint32_t num_get_token_calls_; |
@@ -294,8 +287,7 @@ class AuthenticatingURLLoaderInterceptorAppTest |
void TearDown() override { |
// Close the AuthenticationService explicitly here so that teardown code |
- // doesn't cause |
- // it to receive an OnConnectionError() call. |
+ // doesn't cause it to receive a connection error. |
CloseAuthenticationService(); |
ApplicationTestBase::TearDown(); |
} |