diff options
author | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-28 18:44:58 +0000 |
---|---|---|
committer | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-28 18:44:58 +0000 |
commit | f3cf980ca36d5b557b626d1bba4db6ded3ab2b77 (patch) | |
tree | 74028618ccef405480ff6da6a9d0d8c80a8fda7f /net/http/http_auth_cache.h | |
parent | 7f5969dda833a858bc946ca59ba0a9afbee2bc89 (diff) | |
download | chromium_src-f3cf980ca36d5b557b626d1bba4db6ded3ab2b77.zip chromium_src-f3cf980ca36d5b557b626d1bba4db6ded3ab2b77.tar.gz chromium_src-f3cf980ca36d5b557b626d1bba4db6ded3ab2b77.tar.bz2 |
Use AuthCredentials throughout the network stack instead of username/password.
This is a refactor only - no behavior change should happen.
Review URL: http://codereview.chromium.org/8340026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107766 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_auth_cache.h')
-rw-r--r-- | net/http/http_auth_cache.h | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/net/http/http_auth_cache.h b/net/http/http_auth_cache.h index a5af644..3de2c71 100644 --- a/net/http/http_auth_cache.h +++ b/net/http/http_auth_cache.h @@ -11,7 +11,6 @@ #include "base/gtest_prod_util.h" #include "base/memory/ref_counted.h" -#include "base/string16.h" #include "googleurl/src/gurl.h" #include "net/base/net_export.h" #include "net/http/http_auth.h" @@ -66,8 +65,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 +73,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 +130,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 +171,7 @@ class NET_EXPORT_PRIVATE HttpAuthCache::Entry { // Identity. std::string auth_challenge_; - string16 username_; - string16 password_; + AuthCredentials credentials_; int nonce_count_; |