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

Unified Diff: services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor.cc

Issue 1185563003: Move AuthenticatingURLLoader app from ErrorHandler to callbacks (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Response to review Created 5 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 side-by-side diff with in-line comments
Download patch
Index: services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor.cc
diff --git a/services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor.cc b/services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor.cc
index 7219d5c478cc82c7ae6328b6b58819a6806ce63a..5fca2efd8f9c5f7e9c524b38527411bccba91754 100644
--- a/services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor.cc
+++ b/services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor.cc
@@ -17,12 +17,16 @@ AuthenticatingURLLoaderInterceptor::AuthenticatingURLLoaderInterceptor(
factory_(factory),
add_authentication_(true),
request_authorization_state_(REQUEST_INITIAL) {
- binding_.set_error_handler(this);
}
AuthenticatingURLLoaderInterceptor::~AuthenticatingURLLoaderInterceptor() {
}
+void AuthenticatingURLLoaderInterceptor::set_connection_error_handler(
+ const Closure& error_handler) {
+ binding_.set_connection_error_handler(error_handler);
+}
+
void AuthenticatingURLLoaderInterceptor::InterceptRequest(
mojo::URLRequestPtr request,
const InterceptRequestCallback& callback) {
@@ -156,11 +160,6 @@ void AuthenticatingURLLoaderInterceptor::InterceptResponse(
base::Unretained(this)));
}
-void AuthenticatingURLLoaderInterceptor::OnConnectionError() {
- factory_->OnInterceptorError(this);
- // The factory deleted this object.
-}
-
URLRequestPtr AuthenticatingURLLoaderInterceptor::BuildRequest(
std::string token) {
// We should only be sending out a request with a token if the initial

Powered by Google App Engine
This is Rietveld 408576698