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

Side by Side Diff: net/http/http_auth_cache.h

Issue 351833002: Add support for clearing the HTTP auth cache. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | net/http/http_auth_cache.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_HTTP_HTTP_AUTH_CACHE_H_ 5 #ifndef NET_HTTP_HTTP_AUTH_CACHE_H_
6 #define NET_HTTP_HTTP_AUTH_CACHE_H_ 6 #define NET_HTTP_HTTP_AUTH_CACHE_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 // |origin| - the {scheme, host, port} of the server. 156 // |origin| - the {scheme, host, port} of the server.
157 // |realm| - case sensitive realm string. 157 // |realm| - case sensitive realm string.
158 // |scheme| - the authentication scheme (i.e. basic, negotiate). 158 // |scheme| - the authentication scheme (i.e. basic, negotiate).
159 // |credentials| - the credentials to match. 159 // |credentials| - the credentials to match.
160 // returns - true if an entry was removed. 160 // returns - true if an entry was removed.
161 bool Remove(const GURL& origin, 161 bool Remove(const GURL& origin,
162 const std::string& realm, 162 const std::string& realm,
163 HttpAuth::Scheme scheme, 163 HttpAuth::Scheme scheme,
164 const AuthCredentials& credentials); 164 const AuthCredentials& credentials);
165 165
166 // Clears the cache.
167 void Clear();
168
166 // Updates a stale digest entry on server |origin| for realm |realm| and 169 // Updates a stale digest entry on server |origin| for realm |realm| and
167 // scheme |scheme|. The cached auth challenge is replaced with 170 // scheme |scheme|. The cached auth challenge is replaced with
168 // |auth_challenge| and the nonce count is reset. 171 // |auth_challenge| and the nonce count is reset.
169 // |UpdateStaleChallenge()| returns true if a matching entry exists in the 172 // |UpdateStaleChallenge()| returns true if a matching entry exists in the
170 // cache, false otherwise. 173 // cache, false otherwise.
171 bool UpdateStaleChallenge(const GURL& origin, 174 bool UpdateStaleChallenge(const GURL& origin,
172 const std::string& realm, 175 const std::string& realm,
173 HttpAuth::Scheme scheme, 176 HttpAuth::Scheme scheme,
174 const std::string& auth_challenge); 177 const std::string& auth_challenge);
175 178
176 // Copies all entries from |other| cache. 179 // Copies all entries from |other| cache.
177 void UpdateAllFrom(const HttpAuthCache& other); 180 void UpdateAllFrom(const HttpAuthCache& other);
178 181
179 private: 182 private:
180 typedef std::list<Entry> EntryList; 183 typedef std::list<Entry> EntryList;
181 EntryList entries_; 184 EntryList entries_;
182 }; 185 };
183 186
184 // An authentication realm entry. 187 // An authentication realm entry.
185 } // namespace net 188 } // namespace net
186 189
187 #endif // NET_HTTP_HTTP_AUTH_CACHE_H_ 190 #endif // NET_HTTP_HTTP_AUTH_CACHE_H_
OLDNEW
« no previous file with comments | « no previous file | net/http/http_auth_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698