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

Unified Diff: services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor.h

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
« no previous file with comments | « no previous file | services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor.h
diff --git a/services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor.h b/services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor.h
index 79b50250e70672aa92b66f31c5b85d0d84a0736e..4ccc8133e12050d44a31e7d1187566424b44174c 100644
--- a/services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor.h
+++ b/services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor.h
@@ -6,7 +6,6 @@
#define SERVICES_AUTHENTICATING_URL_LOADER_INTERCEPTOR_AUTHENTICATING_URL_LOADER_INTERCEPTOR_H_
#include "mojo/public/cpp/bindings/binding.h"
-#include "mojo/public/cpp/bindings/error_handler.h"
#include "mojo/services/network/public/interfaces/url_loader.mojom.h"
#include "services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor_factory.h"
#include "url/gurl.h"
@@ -21,14 +20,15 @@ enum RequestAuthorizationState {
REQUEST_USED_FRESH_AUTH_SERVICE_TOKEN,
};
-class AuthenticatingURLLoaderInterceptor : public URLLoaderInterceptor,
- public ErrorHandler {
+class AuthenticatingURLLoaderInterceptor : public URLLoaderInterceptor {
public:
AuthenticatingURLLoaderInterceptor(
mojo::InterfaceRequest<URLLoaderInterceptor> request,
AuthenticatingURLLoaderInterceptorFactory* factory);
~AuthenticatingURLLoaderInterceptor() override;
+ void set_connection_error_handler(const Closure& error_handler);
+
private:
// URLLoaderInterceptor:
void InterceptRequest(mojo::URLRequestPtr request,
@@ -38,15 +38,14 @@ class AuthenticatingURLLoaderInterceptor : public URLLoaderInterceptor,
void InterceptResponse(mojo::URLResponsePtr response,
const InterceptResponseCallback& callback) override;
- // ErrorHandler:
- void OnConnectionError() override;
-
void OnOAuth2TokenReceived(std::string token);
URLRequestPtr BuildRequest(std::string token);
void StartRequest(mojo::URLRequestPtr request);
Binding<URLLoaderInterceptor> binding_;
+
+ // Owns this object.
AuthenticatingURLLoaderInterceptorFactory* factory_;
InterceptResponseCallback pending_interception_callback_;
URLResponsePtr pending_response_;
« no previous file with comments | « no previous file | services/authenticating_url_loader_interceptor/authenticating_url_loader_interceptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698