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" | |
7 | 6 |
8 namespace net { | 7 namespace net { |
9 | 8 |
10 AuthChallengeInfo::AuthChallengeInfo() : is_proxy(false) { | 9 AuthChallengeInfo::AuthChallengeInfo() : is_proxy(false) { |
11 } | 10 } |
12 | 11 |
13 bool AuthChallengeInfo::Equals(const AuthChallengeInfo& that) const { | 12 bool AuthChallengeInfo::Equals(const AuthChallengeInfo& that) const { |
14 return (this->is_proxy == that.is_proxy && | 13 return (this->is_proxy == that.is_proxy && |
15 this->challenger == that.challenger && this->scheme == that.scheme && | 14 this->challenger == that.challenger && this->scheme == that.scheme && |
16 this->realm == that.realm); | 15 this->realm == that.realm); |
(...skipping 21 matching lines...) Expand all Loading... |
38 } | 37 } |
39 | 38 |
40 bool AuthCredentials::Equals(const AuthCredentials& other) const { | 39 bool AuthCredentials::Equals(const AuthCredentials& other) const { |
41 return username_ == other.username_ && password_ == other.password_; | 40 return username_ == other.username_ && password_ == other.password_; |
42 } | 41 } |
43 | 42 |
44 bool AuthCredentials::Empty() const { | 43 bool AuthCredentials::Empty() const { |
45 return username_.empty() && password_.empty(); | 44 return username_.empty() && password_.empty(); |
46 } | 45 } |
47 | 46 |
48 void AuthCredentials::Zap() { | |
49 ZapString(&password_); | |
50 } | |
51 | |
52 } // namespace net | 47 } // namespace net |
OLD | NEW |