Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Side by Side Diff: chrome/browser/certificate_manager_model.cc

Issue 10956061: chrome: Move crypto_module_password_dialog.h into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "chrome/browser/certificate_manager_model.h" 5 #include "chrome/browser/certificate_manager_model.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/i18n/time_formatting.h" 8 #include "base/i18n/time_formatting.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 17 matching lines...) Expand all
28 } 28 }
29 29
30 CertificateManagerModel::~CertificateManagerModel() { 30 CertificateManagerModel::~CertificateManagerModel() {
31 } 31 }
32 32
33 void CertificateManagerModel::Refresh() { 33 void CertificateManagerModel::Refresh() {
34 VLOG(1) << "refresh started"; 34 VLOG(1) << "refresh started";
35 net::CryptoModuleList modules; 35 net::CryptoModuleList modules;
36 cert_db_->ListModules(&modules, false); 36 cert_db_->ListModules(&modules, false);
37 VLOG(1) << "refresh waiting for unlocking..."; 37 VLOG(1) << "refresh waiting for unlocking...";
38 browser::UnlockSlotsIfNecessary( 38 chrome::UnlockSlotsIfNecessary(
39 modules, 39 modules,
40 browser::kCryptoModulePasswordListCerts, 40 chrome::kCryptoModulePasswordListCerts,
41 "", // unused. 41 "", // unused.
42 base::Bind(&CertificateManagerModel::RefreshSlotsUnlocked, 42 base::Bind(&CertificateManagerModel::RefreshSlotsUnlocked,
43 base::Unretained(this))); 43 base::Unretained(this)));
44 } 44 }
45 45
46 void CertificateManagerModel::RefreshSlotsUnlocked() { 46 void CertificateManagerModel::RefreshSlotsUnlocked() {
47 VLOG(1) << "refresh listing certs..."; 47 VLOG(1) << "refresh listing certs...";
48 cert_db_->ListCerts(&cert_list_); 48 cert_db_->ListCerts(&cert_list_);
49 observer_->CertificatesRefreshed(); 49 observer_->CertificatesRefreshed();
50 VLOG(1) << "refresh finished"; 50 VLOG(1) << "refresh finished";
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 bool CertificateManagerModel::IsHardwareBacked( 158 bool CertificateManagerModel::IsHardwareBacked(
159 const net::X509Certificate* cert) const { 159 const net::X509Certificate* cert) const {
160 #if defined(OS_CHROMEOS) 160 #if defined(OS_CHROMEOS)
161 return crypto::IsTPMTokenReady() && 161 return crypto::IsTPMTokenReady() &&
162 cert->os_cert_handle()->slot == 162 cert->os_cert_handle()->slot ==
163 cert_db_->GetPrivateModule()->os_module_handle(); 163 cert_db_->GetPrivateModule()->os_module_handle();
164 #else 164 #else
165 return false; 165 return false;
166 #endif 166 #endif
167 } 167 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698