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 #include "net/base/auth.h" | 5 #include "net/base/auth.h" |
6 #include "net/base/zap.h" | 6 #include "net/base/zap.h" |
7 | 7 |
8 namespace net { | 8 namespace net { |
9 | 9 |
10 AuthChallengeInfo::AuthChallengeInfo() : is_proxy(false) { | 10 AuthChallengeInfo::AuthChallengeInfo() : is_proxy(false) { |
11 } | 11 } |
12 | 12 |
13 bool AuthChallengeInfo::Equals(const AuthChallengeInfo& that) const { | 13 bool AuthChallengeInfo::Equals(const AuthChallengeInfo& that) const { |
14 return (this->is_proxy == that.is_proxy && | 14 return (this->is_proxy == that.is_proxy && |
15 this->challenger == that.challenger && this->scheme == that.scheme && | 15 this->challenger == that.challenger && this->scheme == that.scheme && |
16 this->realm == that.realm); | 16 this->realm == that.realm); |
17 } | 17 } |
18 | 18 |
19 AuthChallengeInfo::~AuthChallengeInfo() { | 19 AuthChallengeInfo::~AuthChallengeInfo() { |
20 } | 20 } |
21 | 21 |
22 AuthData::AuthData() : state(AUTH_STATE_NEED_AUTH) { | |
23 } | |
24 | |
25 AuthData::~AuthData() { | |
26 } | |
27 | |
28 AuthCredentials::AuthCredentials() { | 22 AuthCredentials::AuthCredentials() { |
29 } | 23 } |
30 | 24 |
31 AuthCredentials::AuthCredentials(const base::string16& username, | 25 AuthCredentials::AuthCredentials(const base::string16& username, |
32 const base::string16& password) | 26 const base::string16& password) |
33 : username_(username), | 27 : username_(username), |
34 password_(password) { | 28 password_(password) { |
35 } | 29 } |
36 | 30 |
37 AuthCredentials::~AuthCredentials() { | 31 AuthCredentials::~AuthCredentials() { |
(...skipping 11 matching lines...) Expand all Loading... |
49 | 43 |
50 bool AuthCredentials::Empty() const { | 44 bool AuthCredentials::Empty() const { |
51 return username_.empty() && password_.empty(); | 45 return username_.empty() && password_.empty(); |
52 } | 46 } |
53 | 47 |
54 void AuthCredentials::Zap() { | 48 void AuthCredentials::Zap() { |
55 ZapString(&password_); | 49 ZapString(&password_); |
56 } | 50 } |
57 | 51 |
58 } // namespace net | 52 } // namespace net |
OLD | NEW |