OLD | NEW |
---|---|
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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <list> | 10 #include <list> |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
155 // |origin| - the {scheme, host, port} of the server. | 155 // |origin| - the {scheme, host, port} of the server. |
156 // |realm| - case sensitive realm string. | 156 // |realm| - case sensitive realm string. |
157 // |scheme| - the authentication scheme (i.e. basic, negotiate). | 157 // |scheme| - the authentication scheme (i.e. basic, negotiate). |
158 // |credentials| - the credentials to match. | 158 // |credentials| - the credentials to match. |
159 // returns - true if an entry was removed. | 159 // returns - true if an entry was removed. |
160 bool Remove(const GURL& origin, | 160 bool Remove(const GURL& origin, |
161 const std::string& realm, | 161 const std::string& realm, |
162 HttpAuth::Scheme scheme, | 162 HttpAuth::Scheme scheme, |
163 const AuthCredentials& credentials); | 163 const AuthCredentials& credentials); |
164 | 164 |
165 // Clears the cache. | 165 // Clears the cache. |
msramek
2016/06/30 11:36:20
Please improve the comment explain the parameters.
Tomasz Moniuszko
2016/07/01 12:44:02
Done.
| |
166 void Clear(); | 166 void Clear(base::Time delete_begin, base::Time delete_end); |
167 | 167 |
168 // Updates a stale digest entry on server |origin| for realm |realm| and | 168 // Updates a stale digest entry on server |origin| for realm |realm| and |
169 // scheme |scheme|. The cached auth challenge is replaced with | 169 // scheme |scheme|. The cached auth challenge is replaced with |
170 // |auth_challenge| and the nonce count is reset. | 170 // |auth_challenge| and the nonce count is reset. |
171 // |UpdateStaleChallenge()| returns true if a matching entry exists in the | 171 // |UpdateStaleChallenge()| returns true if a matching entry exists in the |
172 // cache, false otherwise. | 172 // cache, false otherwise. |
173 bool UpdateStaleChallenge(const GURL& origin, | 173 bool UpdateStaleChallenge(const GURL& origin, |
174 const std::string& realm, | 174 const std::string& realm, |
175 HttpAuth::Scheme scheme, | 175 HttpAuth::Scheme scheme, |
176 const std::string& auth_challenge); | 176 const std::string& auth_challenge); |
177 | 177 |
178 // Copies all entries from |other| cache. | 178 // Copies all entries from |other| cache. |
179 void UpdateAllFrom(const HttpAuthCache& other); | 179 void UpdateAllFrom(const HttpAuthCache& other); |
180 | 180 |
181 private: | 181 private: |
182 typedef std::list<Entry> EntryList; | 182 typedef std::list<Entry> EntryList; |
183 EntryList entries_; | 183 EntryList entries_; |
184 }; | 184 }; |
185 | 185 |
186 // An authentication realm entry. | 186 // An authentication realm entry. |
187 } // namespace net | 187 } // namespace net |
188 | 188 |
189 #endif // NET_HTTP_HTTP_AUTH_CACHE_H_ | 189 #endif // NET_HTTP_HTTP_AUTH_CACHE_H_ |
OLD | NEW |