OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/transport_security_state.h" | 5 #include "net/base/transport_security_state.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 enabled_hosts_.erase(i++); | 340 enabled_hosts_.erase(i++); |
341 } else { | 341 } else { |
342 i++; | 342 i++; |
343 } | 343 } |
344 } | 344 } |
345 | 345 |
346 if (dirtied) | 346 if (dirtied) |
347 DirtyNotify(); | 347 DirtyNotify(); |
348 } | 348 } |
349 | 349 |
| 350 TransportSecurityState::~TransportSecurityState() { |
| 351 } |
| 352 |
350 void TransportSecurityState::DirtyNotify() { | 353 void TransportSecurityState::DirtyNotify() { |
351 if (delegate_) | 354 if (delegate_) |
352 delegate_->StateIsDirty(this); | 355 delegate_->StateIsDirty(this); |
353 } | 356 } |
354 | 357 |
355 // static | 358 // static |
356 std::string TransportSecurityState::CanonicaliseHost(const std::string& host) { | 359 std::string TransportSecurityState::CanonicaliseHost(const std::string& host) { |
357 // We cannot perform the operations as detailed in the spec here as |host| | 360 // We cannot perform the operations as detailed in the spec here as |host| |
358 // has already undergone IDN processing before it reached us. Thus, we check | 361 // has already undergone IDN processing before it reached us. Thus, we check |
359 // that there are no invalid characters in the host and lowercase the result. | 362 // that there are no invalid characters in the host and lowercase the result. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 *include_subdomains = kPreloadedSTS[j].include_subdomains; | 420 *include_subdomains = kPreloadedSTS[j].include_subdomains; |
418 return true; | 421 return true; |
419 } | 422 } |
420 } | 423 } |
421 } | 424 } |
422 | 425 |
423 return false; | 426 return false; |
424 } | 427 } |
425 | 428 |
426 } // namespace | 429 } // namespace |
OLD | NEW |