| 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_BASE_AUTH_H__ | 5 #ifndef NET_BASE_AUTH_H__ |
| 6 #define NET_BASE_AUTH_H__ | 6 #define NET_BASE_AUTH_H__ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
| 12 #include "net/base/host_port_pair.h" | |
| 13 #include "net/base/net_export.h" | 12 #include "net/base/net_export.h" |
| 13 #include "url/origin.h" |
| 14 | 14 |
| 15 namespace net { | 15 namespace net { |
| 16 | 16 |
| 17 // Holds info about an authentication challenge that we may want to display | 17 // Holds info about an authentication challenge that we may want to display |
| 18 // to the user. | 18 // to the user. |
| 19 class NET_EXPORT AuthChallengeInfo : | 19 class NET_EXPORT AuthChallengeInfo : |
| 20 public base::RefCountedThreadSafe<AuthChallengeInfo> { | 20 public base::RefCountedThreadSafe<AuthChallengeInfo> { |
| 21 public: | 21 public: |
| 22 AuthChallengeInfo(); | 22 AuthChallengeInfo(); |
| 23 | 23 |
| 24 // Determines whether two AuthChallengeInfo's are equivalent. | 24 // Determines whether two AuthChallengeInfo's are equivalent. |
| 25 bool Equals(const AuthChallengeInfo& other) const; | 25 bool Equals(const AuthChallengeInfo& other) const; |
| 26 | 26 |
| 27 // Whether this came from a server or a proxy. | 27 // Whether this came from a server or a proxy. |
| 28 bool is_proxy; | 28 bool is_proxy; |
| 29 | 29 |
| 30 // The service issuing the challenge. | 30 // The service issuing the challenge. |
| 31 HostPortPair challenger; | 31 url::Origin challenger; |
| 32 | 32 |
| 33 // The authentication scheme used, such as "basic" or "digest". If the | 33 // The authentication scheme used, such as "basic" or "digest". If the |
| 34 // |source| is FTP_SERVER, this is an empty string. The encoding is ASCII. | 34 // |source| is FTP_SERVER, this is an empty string. The encoding is ASCII. |
| 35 std::string scheme; | 35 std::string scheme; |
| 36 | 36 |
| 37 // The realm of the challenge. May be empty. The encoding is UTF-8. | 37 // The realm of the challenge. May be empty. The encoding is UTF-8. |
| 38 std::string realm; | 38 std::string realm; |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 friend class base::RefCountedThreadSafe<AuthChallengeInfo>; | 41 friend class base::RefCountedThreadSafe<AuthChallengeInfo>; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 AuthData(); | 98 AuthData(); |
| 99 | 99 |
| 100 private: | 100 private: |
| 101 friend class base::RefCountedThreadSafe<AuthData>; | 101 friend class base::RefCountedThreadSafe<AuthData>; |
| 102 ~AuthData(); | 102 ~AuthData(); |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 } // namespace net | 105 } // namespace net |
| 106 | 106 |
| 107 #endif // NET_BASE_AUTH_H__ | 107 #endif // NET_BASE_AUTH_H__ |
| OLD | NEW |