| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chromeos/network/cert_loader.h" | 5 #include "chromeos/network/cert_loader.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/chromeos/chromeos_version.h" | 9 #include "base/chromeos/chromeos_version.h" |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 } | 143 } |
| 144 case TPM_TOKEN_NSS_INITIALIZED: { | 144 case TPM_TOKEN_NSS_INITIALIZED: { |
| 145 StartLoadCertificates(); | 145 StartLoadCertificates(); |
| 146 return; | 146 return; |
| 147 } | 147 } |
| 148 } | 148 } |
| 149 } | 149 } |
| 150 | 150 |
| 151 void CertLoader::RetryTokenInitializationLater() { | 151 void CertLoader::RetryTokenInitializationLater() { |
| 152 LOG(WARNING) << "Re-Requesting Certificates later."; | 152 LOG(WARNING) << "Re-Requesting Certificates later."; |
| 153 MessageLoop::current()->PostDelayedTask( | 153 base::MessageLoop::current()->PostDelayedTask( |
| 154 FROM_HERE, | 154 FROM_HERE, |
| 155 base::Bind(&CertLoader::InitializeTokenAndLoadCertificates, | 155 base::Bind(&CertLoader::InitializeTokenAndLoadCertificates, |
| 156 initialize_token_factory_.GetWeakPtr()), | 156 initialize_token_factory_.GetWeakPtr()), |
| 157 tpm_request_delay_); | 157 tpm_request_delay_); |
| 158 tpm_request_delay_ = GetNextRequestDelayMs(tpm_request_delay_); | 158 tpm_request_delay_ = GetNextRequestDelayMs(tpm_request_delay_); |
| 159 } | 159 } |
| 160 | 160 |
| 161 // For background see this discussion on dev-tech-crypto.lists.mozilla.org: | 161 // For background see this discussion on dev-tech-crypto.lists.mozilla.org: |
| 162 // http://web.archiveorange.com/archive/v/6JJW7E40sypfZGtbkzxX | 162 // http://web.archiveorange.com/archive/v/6JJW7E40sypfZGtbkzxX |
| 163 // | 163 // |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 VLOG(1) << "OnCertRemoved"; | 300 VLOG(1) << "OnCertRemoved"; |
| 301 StartLoadCertificates(); | 301 StartLoadCertificates(); |
| 302 } | 302 } |
| 303 | 303 |
| 304 void CertLoader::LoggedInStateChanged(LoginState::LoggedInState state) { | 304 void CertLoader::LoggedInStateChanged(LoginState::LoggedInState state) { |
| 305 VLOG(1) << "LoggedInStateChanged: " << state; | 305 VLOG(1) << "LoggedInStateChanged: " << state; |
| 306 RequestCertificates(); | 306 RequestCertificates(); |
| 307 } | 307 } |
| 308 | 308 |
| 309 } // namespace chromeos | 309 } // namespace chromeos |
| OLD | NEW |