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 <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 public: | 29 public: |
30 class NET_EXPORT_PRIVATE Entry { | 30 class NET_EXPORT_PRIVATE Entry { |
31 public: | 31 public: |
32 ~Entry(); | 32 ~Entry(); |
33 | 33 |
34 const GURL& origin() const { | 34 const GURL& origin() const { |
35 return origin_; | 35 return origin_; |
36 } | 36 } |
37 | 37 |
38 // The case-sensitive realm string of the challenge. | 38 // The case-sensitive realm string of the challenge. |
39 const std::string realm() const { | 39 const std::string& realm() const { return realm_; } |
40 return realm_; | |
41 } | |
42 | 40 |
43 // The authentication scheme of the challenge. | 41 // The authentication scheme of the challenge. |
44 HttpAuth::Scheme scheme() const { | 42 HttpAuth::Scheme scheme() const { |
45 return scheme_; | 43 return scheme_; |
46 } | 44 } |
47 | 45 |
48 // The authentication challenge. | 46 // The authentication challenge. |
49 const std::string auth_challenge() const { | 47 const std::string& auth_challenge() const { return auth_challenge_; } |
50 return auth_challenge_; | |
51 } | |
52 | 48 |
53 // The login credentials. | 49 // The login credentials. |
54 const AuthCredentials& credentials() const { | 50 const AuthCredentials& credentials() const { |
55 return credentials_; | 51 return credentials_; |
56 } | 52 } |
57 | 53 |
58 int IncrementNonceCount() { | 54 int IncrementNonceCount() { |
59 return ++nonce_count_; | 55 return ++nonce_count_; |
60 } | 56 } |
61 | 57 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 177 |
182 private: | 178 private: |
183 typedef std::list<Entry> EntryList; | 179 typedef std::list<Entry> EntryList; |
184 EntryList entries_; | 180 EntryList entries_; |
185 }; | 181 }; |
186 | 182 |
187 // An authentication realm entry. | 183 // An authentication realm entry. |
188 } // namespace net | 184 } // namespace net |
189 | 185 |
190 #endif // NET_HTTP_HTTP_AUTH_CACHE_H_ | 186 #endif // NET_HTTP_HTTP_AUTH_CACHE_H_ |
OLD | NEW |