Chromium Code Reviews| Index: components/cast_certificate/cast_cert_validator.cc |
| diff --git a/components/cast_certificate/cast_cert_validator.cc b/components/cast_certificate/cast_cert_validator.cc |
| index f7c62dd7aff5bc32904119251bc05f78a79ff329..a553fa1f0a8b4c97b945e3f28e8a658c376ce2aa 100644 |
| --- a/components/cast_certificate/cast_cert_validator.cc |
| +++ b/components/cast_certificate/cast_cert_validator.cc |
| @@ -55,10 +55,15 @@ class CastTrustStore { |
| static net::TrustStore& Get() { return GetInstance()->store_; } |
| + static void Reinitialize() { GetInstance()->Initialize(); } |
|
eroman
2016/08/03 22:47:58
How about ReinitializeForTest() ?
Or make a comme
ryanchung
2016/08/04 18:46:43
Removed this code. It's no longer needed due to th
|
| + |
| private: |
| friend struct base::DefaultSingletonTraits<CastTrustStore>; |
| - CastTrustStore() { |
| + CastTrustStore() { Initialize(); } |
| + |
| + void Initialize() { |
| + store_.Clear(); |
| AddAnchor(kCastRootCaDer); |
| AddAnchor(kEurekaRootCaDer); |
| } |
| @@ -341,4 +346,8 @@ bool SetTrustAnchorForTest(const std::string& cert) { |
| return true; |
| } |
| +void ResetTrustAnchorForTest() { |
| + CastTrustStore::Reinitialize(); |
| +} |
| + |
| } // namespace cast_certificate |