OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_TRANSPORT_SECURITY_STATE_H_ | 5 #ifndef NET_BASE_TRANSPORT_SECURITY_STATE_H_ |
6 #define NET_BASE_TRANSPORT_SECURITY_STATE_H_ | 6 #define NET_BASE_TRANSPORT_SECURITY_STATE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
144 // certificate chain. | 144 // certificate chain. |
145 FingerprintVector bad_static_spki_hashes; | 145 FingerprintVector bad_static_spki_hashes; |
146 | 146 |
147 // The following members are not valid when stored in |enabled_hosts_|: | 147 // The following members are not valid when stored in |enabled_hosts_|: |
148 | 148 |
149 // The domain which matched during a search for this DomainState entry. | 149 // The domain which matched during a search for this DomainState entry. |
150 // Updated by |GetDomainState| and |GetStaticDomainState|. | 150 // Updated by |GetDomainState| and |GetStaticDomainState|. |
151 std::string domain; | 151 std::string domain; |
152 }; | 152 }; |
153 | 153 |
154 class Iterator { | 154 class Iterator { |
mmenke
2012/08/09 17:05:09
Looks like this should be NET_EXPORT.
| |
155 public: | 155 public: |
156 explicit Iterator(const TransportSecurityState& state) | 156 explicit Iterator(const TransportSecurityState& state); |
157 : iterator_(state.enabled_hosts_.begin()), | 157 ~Iterator(); |
158 end_(state.enabled_hosts_.end()) { | |
159 } | |
160 ~Iterator() {} | |
161 | 158 |
162 bool HasNext() const { return iterator_ != end_; } | 159 bool HasNext() const { return iterator_ != end_; } |
163 void Advance() { ++iterator_; } | 160 void Advance() { ++iterator_; } |
164 const std::string& hostname() const { return iterator_->first; } | 161 const std::string& hostname() const { return iterator_->first; } |
165 const DomainState& domain_state() const { return iterator_->second; } | 162 const DomainState& domain_state() const { return iterator_->second; } |
166 | 163 |
167 private: | 164 private: |
168 std::map<std::string, DomainState>::const_iterator iterator_; | 165 std::map<std::string, DomainState>::const_iterator iterator_; |
169 std::map<std::string, DomainState>::const_iterator end_; | 166 std::map<std::string, DomainState>::const_iterator end_; |
170 }; | 167 }; |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
288 std::map<std::string, DomainState> forced_hosts_; | 285 std::map<std::string, DomainState> forced_hosts_; |
289 | 286 |
290 Delegate* delegate_; | 287 Delegate* delegate_; |
291 | 288 |
292 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); | 289 DISALLOW_COPY_AND_ASSIGN(TransportSecurityState); |
293 }; | 290 }; |
294 | 291 |
295 } // namespace net | 292 } // namespace net |
296 | 293 |
297 #endif // NET_BASE_TRANSPORT_SECURITY_STATE_H_ | 294 #endif // NET_BASE_TRANSPORT_SECURITY_STATE_H_ |
OLD | NEW |