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

Unified Diff: services/authenticating_url_loader/authenticating_url_loader_impl.h

Issue 1161603003: Have the authenticating_url_loader cache token per-origin. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 7 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/authenticating_url_loader_impl.h
diff --git a/services/authenticating_url_loader/authenticating_url_loader_impl.h b/services/authenticating_url_loader/authenticating_url_loader_impl.h
index e1e9d030b1355addaa66e3a8812e1458ed80cc12..69c406b23d0e9751d54b6d61bdb7b510d5962fe6 100644
--- a/services/authenticating_url_loader/authenticating_url_loader_impl.h
+++ b/services/authenticating_url_loader/authenticating_url_loader_impl.h
@@ -10,6 +10,7 @@
#include "mojo/services/authenticating_url_loader/public/interfaces/authenticating_url_loader.mojom.h"
#include "mojo/services/authentication/public/interfaces/authentication.mojom.h"
#include "mojo/services/network/public/interfaces/url_loader.mojom.h"
+#include "url/gurl.h"
namespace mojo {
@@ -28,6 +29,7 @@ class AuthenticatingURLLoaderImpl : public AuthenticatingURLLoader,
InterfaceRequest<AuthenticatingURLLoader> request,
authentication::AuthenticationService* authentication_service,
NetworkService* network_service,
+ std::map<GURL, std::string>* cached_tokens,
const Callback<void(AuthenticatingURLLoaderImpl*)>&
connection_error_callback);
~AuthenticatingURLLoaderImpl() override;
@@ -58,13 +60,14 @@ class AuthenticatingURLLoaderImpl : public AuthenticatingURLLoader,
URLLoaderPtr url_loader_;
URLResponsePtr pending_response_;
RequestAuthorizationState request_authorization_state_;
- String url_;
+ GURL url_;
bool auto_follow_redirects_;
bool bypass_cache_;
Array<String> headers_;
String username_;
String token_;
Callback<void(URLResponsePtr)> pending_start_callback_;
+ std::map<GURL, std::string>* cached_tokens_;
};
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698