Commit e8d9d914 authored by christiank@opera.com's avatar christiank@opera.com

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
parent 81d08aa6
...@@ -249,6 +249,10 @@ bool HttpAuthCache::Remove(const GURL& origin, ...@@ -249,6 +249,10 @@ bool HttpAuthCache::Remove(const GURL& origin,
return false; return false;
} }
void HttpAuthCache::Clear() {
entries_.clear();
}
bool HttpAuthCache::UpdateStaleChallenge(const GURL& origin, bool HttpAuthCache::UpdateStaleChallenge(const GURL& origin,
const std::string& realm, const std::string& realm,
HttpAuth::Scheme scheme, HttpAuth::Scheme scheme,
......
...@@ -163,6 +163,9 @@ class NET_EXPORT_PRIVATE HttpAuthCache { ...@@ -163,6 +163,9 @@ class NET_EXPORT_PRIVATE HttpAuthCache {
HttpAuth::Scheme scheme, HttpAuth::Scheme scheme,
const AuthCredentials& credentials); const AuthCredentials& credentials);
// Clears the cache.
void Clear();
// Updates a stale digest entry on server |origin| for realm |realm| and // Updates a stale digest entry on server |origin| for realm |realm| and
// scheme |scheme|. The cached auth challenge is replaced with // scheme |scheme|. The cached auth challenge is replaced with
// |auth_challenge| and the nonce count is reset. // |auth_challenge| and the nonce count is reset.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment