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/ftp/ftp_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/ftp/ftp_auth_cache.h')
-rw-r--r-- | net/ftp/ftp_auth_cache.h | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/net/ftp/ftp_auth_cache.h b/net/ftp/ftp_auth_cache.h index 6281f9d..393b23d 100644 --- a/net/ftp/ftp_auth_cache.h +++ b/net/ftp/ftp_auth_cache.h @@ -8,8 +8,8 @@ #include <list> -#include "base/string16.h" #include "googleurl/src/gurl.h" +#include "net/base/auth.h" #include "net/base/net_export.h" namespace net { @@ -28,13 +28,11 @@ class NET_EXPORT_PRIVATE FtpAuthCache { static const size_t kMaxEntries; struct Entry { - Entry(const GURL& origin, const string16& username, - const string16& password); + Entry(const GURL& origin, const AuthCredentials& credentials); ~Entry(); const GURL origin; - string16 username; - string16 password; + AuthCredentials credentials; }; FtpAuthCache(); @@ -43,16 +41,13 @@ class NET_EXPORT_PRIVATE FtpAuthCache { // Return Entry corresponding to given |origin| or NULL if not found. Entry* Lookup(const GURL& origin); - // Add an entry for |origin| to the cache (consisting of |username| and - // |password|). If there is already an entry for |origin|, it will be - // overwritten. - void Add(const GURL& origin, const string16& username, - const string16& password); + // Add an entry for |origin| to the cache using |credentials|. If there is + // already an entry for |origin|, it will be overwritten. + void Add(const GURL& origin, const AuthCredentials& credentials); // Remove the entry for |origin| from the cache, if one exists and matches - // |username| and |password|. - void Remove(const GURL& origin, const string16& username, - const string16& password); + // |credentials|. + void Remove(const GURL& origin, const AuthCredentials& credentials); private: typedef std::list<Entry> EntryList; |