| 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 "chrome/browser/chromeos/cros/cert_library.h" | 5 #include "chrome/browser/chromeos/cros/cert_library.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/observer_list_threadsafe.h" | 9 #include "base/observer_list_threadsafe.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 virtual const CertList& GetServerCertificates() const OVERRIDE { | 169 virtual const CertList& GetServerCertificates() const OVERRIDE { |
| 170 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 170 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 171 return server_certs_; | 171 return server_certs_; |
| 172 } | 172 } |
| 173 | 173 |
| 174 virtual const CertList& GetCACertificates() const OVERRIDE { | 174 virtual const CertList& GetCACertificates() const OVERRIDE { |
| 175 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 175 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 176 return server_ca_certs_; | 176 return server_ca_certs_; |
| 177 } | 177 } |
| 178 | 178 |
| 179 virtual crypto::SymmetricKey* GetSupplementalUserKey() const { |
| 180 return crypto::GetSupplementalUserKey(); |
| 181 } |
| 182 |
| 179 // net::CertDatabase::Observer implementation. Observer added on UI thread. | 183 // net::CertDatabase::Observer implementation. Observer added on UI thread. |
| 180 virtual void OnCertTrustChanged(const net::X509Certificate* cert) OVERRIDE { | 184 virtual void OnCertTrustChanged(const net::X509Certificate* cert) OVERRIDE { |
| 181 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 185 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 182 } | 186 } |
| 183 | 187 |
| 184 virtual void OnUserCertAdded(const net::X509Certificate* cert) OVERRIDE { | 188 virtual void OnUserCertAdded(const net::X509Certificate* cert) OVERRIDE { |
| 185 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 189 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 186 VLOG(1) << "Certificate Added."; | 190 VLOG(1) << "Certificate Added."; |
| 187 // Only load certificates if we have completed an initial request. | 191 // Only load certificates if we have completed an initial request. |
| 188 if (certificates_loaded_) { | 192 if (certificates_loaded_) { |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 return index; | 403 return index; |
| 400 } | 404 } |
| 401 return -1; // Not found. | 405 return -1; // Not found. |
| 402 } | 406 } |
| 403 | 407 |
| 404 } // chromeos | 408 } // chromeos |
| 405 | 409 |
| 406 // Allows InvokeLater without adding refcounting. This class is a singleton and | 410 // Allows InvokeLater without adding refcounting. This class is a singleton and |
| 407 // won't be deleted until it's last InvokeLater is run. | 411 // won't be deleted until it's last InvokeLater is run. |
| 408 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::CertLibraryImpl); | 412 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::CertLibraryImpl); |
| OLD | NEW |