| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 string16 password; // the password supplied to us for auth. | 58 string16 password; // the password supplied to us for auth. |
| 59 | 59 |
| 60 // We wouldn't instantiate this class if we didn't need authentication. | 60 // We wouldn't instantiate this class if we didn't need authentication. |
| 61 AuthData(); | 61 AuthData(); |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 friend class base::RefCountedThreadSafe<AuthData>; | 64 friend class base::RefCountedThreadSafe<AuthData>; |
| 65 ~AuthData(); | 65 ~AuthData(); |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 // Authentication Credentials for an authentication credentials. |
| 69 class NET_EXPORT AuthCredentials { |
| 70 public: |
| 71 AuthCredentials(); |
| 72 ~AuthCredentials(); |
| 73 |
| 74 // |is_valid| is true if the username and password have been set. Since |
| 75 // username and/or password may be empty, this is needed to differentiate |
| 76 // that case. |
| 77 bool is_valid; |
| 78 |
| 79 // The username to provide, possibly empty. This should be ASCII only to |
| 80 // minimize compatibility problems, but arbitrary UTF-16 strings are allowed |
| 81 // and will be attempted. |
| 82 string16 username; |
| 83 |
| 84 // The password to provide, possibly empty. This should be ASCII only to |
| 85 // minimize compatibility problems, but arbitrary UTF-16 strings are allowed |
| 86 // and will be attempted. |
| 87 string16 password; |
| 88 |
| 89 // Intentionally allowing the implicit copy constructor and assignment |
| 90 // operators. |
| 91 }; |
| 92 |
| 68 } // namespace net | 93 } // namespace net |
| 69 | 94 |
| 70 #endif // NET_BASE_AUTH_H__ | 95 #endif // NET_BASE_AUTH_H__ |
| OLD | NEW |