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

Unified Diff: net/http/http_auth_cache.h

Issue 8340026: Use AuthCredentials throughout the network stack instead of username/password. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: mac compile fix Created 9 years, 2 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: net/http/http_auth_cache.h
diff --git a/net/http/http_auth_cache.h b/net/http/http_auth_cache.h
index a5af644accd97323155252d7e2e2d85a231ae5b6..19b75c41c3eed804daa844ccd12ce3f66e24b391 100644
--- a/net/http/http_auth_cache.h
+++ b/net/http/http_auth_cache.h
@@ -66,8 +66,7 @@ class NET_EXPORT_PRIVATE HttpAuthCache {
// |origin| - the {scheme, host, port} of the server.
// |realm| - the auth realm for the challenge.
// |scheme| - the authentication scheme (i.e. basic, negotiate).
- // |username| - login information for the realm.
- // |password| - login information for the realm.
+ // |credentials| - login information for the realm.
// |path| - absolute path for a resource contained in the protection
// space; this will be added to the list of known paths.
// returns - the entry that was just added/updated.
@@ -75,23 +74,20 @@ class NET_EXPORT_PRIVATE HttpAuthCache {
const std::string& realm,
HttpAuth::Scheme scheme,
const std::string& auth_challenge,
- const string16& username,
- const string16& password,
+ const AuthCredentials& credentials,
const std::string& path);
// Remove entry on server |origin| for realm |realm| and scheme |scheme|
- // if one exists AND if the cached identity matches (|username|, |password|).
+ // if one exists AND if the cached credentials matches |credentials|.
// |origin| - the {scheme, host, port} of the server.
// |realm| - case sensitive realm string.
// |scheme| - the authentication scheme (i.e. basic, negotiate).
- // |username| - condition to match.
- // |password| - condition to match.
+ // |credentials| - the credentials to match.
// returns - true if an entry was removed.
bool Remove(const GURL& origin,
const std::string& realm,
HttpAuth::Scheme scheme,
- const string16& username,
- const string16& password);
+ const AuthCredentials& credentials);
// Updates a stale digest entry on server |origin| for realm |realm| and
// scheme |scheme|. The cached auth challenge is replaced with
@@ -135,14 +131,9 @@ class NET_EXPORT_PRIVATE HttpAuthCache::Entry {
return auth_challenge_;
}
- // The login username.
- const string16 username() const {
- return username_;
- }
-
- // The login password.
- const string16 password() const {
- return password_;
+ // The login credentials.
+ const AuthCredentials& credentials() const {
+ return credentials_;
}
int IncrementNonceCount() {
@@ -181,8 +172,7 @@ class NET_EXPORT_PRIVATE HttpAuthCache::Entry {
// Identity.
std::string auth_challenge_;
- string16 username_;
- string16 password_;
+ AuthCredentials credentials_;
int nonce_count_;

Powered by Google App Engine
This is Rietveld 408576698