diff options
author | christiank@opera.com <christiank@opera.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-14 14:23:45 +0000 |
---|---|---|
committer | christiank@opera.com <christiank@opera.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-14 14:23:45 +0000 |
commit | e8d9d914c5aa1ea3be92bc1039611c6620500b0f (patch) | |
tree | 5a12df0762ee8d401fd6ab5816639302d001216f /net | |
parent | 81d08aa6bcbf89f71d9b3cdd56c9a7a4be8048f4 (diff) | |
download | chromium_src-e8d9d914c5aa1ea3be92bc1039611c6620500b0f.zip chromium_src-e8d9d914c5aa1ea3be92bc1039611c6620500b0f.tar.gz chromium_src-e8d9d914c5aa1ea3be92bc1039611c6620500b0f.tar.bz2 |
Add support for clearing the HTTP auth cache.
This patch adds an API so that the platform can clear the HTTP auth cache
at will. This can be useful when clearing private browsing data to prevent
cached credentials from being re-used.
BUG=63723
Review URL: https://codereview.chromium.org/351833002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282944 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/http/http_auth_cache.cc | 4 | ||||
-rw-r--r-- | net/http/http_auth_cache.h | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/net/http/http_auth_cache.cc b/net/http/http_auth_cache.cc index d989830..51f9035 100644 --- a/net/http/http_auth_cache.cc +++ b/net/http/http_auth_cache.cc @@ -249,6 +249,10 @@ bool HttpAuthCache::Remove(const GURL& origin, return false; } +void HttpAuthCache::Clear() { + entries_.clear(); +} + bool HttpAuthCache::UpdateStaleChallenge(const GURL& origin, const std::string& realm, HttpAuth::Scheme scheme, diff --git a/net/http/http_auth_cache.h b/net/http/http_auth_cache.h index 707a571..1867295 100644 --- a/net/http/http_auth_cache.h +++ b/net/http/http_auth_cache.h @@ -163,6 +163,9 @@ class NET_EXPORT_PRIVATE HttpAuthCache { HttpAuth::Scheme scheme, const AuthCredentials& credentials); + // Clears the cache. + void Clear(); + // Updates a stale digest entry on server |origin| for realm |realm| and // scheme |scheme|. The cached auth challenge is replaced with // |auth_challenge| and the nonce count is reset. |