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

Side by Side Diff: chrome/browser/ui/webui/options/certificate_manager_handler.cc

Issue 209263002: Merge 257570 "Handle cases when user cert database has NULL slots" (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1847/src/
Patch Set: Created 6 years, 9 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
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/ui/webui/options/certificate_manager_handler.h" 5 #include "chrome/browser/ui/webui/options/certificate_manager_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 } 981 }
982 } 982 }
983 983
984 void CertificateManagerHandler::OnCertificateManagerModelCreated( 984 void CertificateManagerHandler::OnCertificateManagerModelCreated(
985 scoped_ptr<CertificateManagerModel> model) { 985 scoped_ptr<CertificateManagerModel> model) {
986 certificate_manager_model_ = model.Pass(); 986 certificate_manager_model_ = model.Pass();
987 CertificateManagerModelReady(); 987 CertificateManagerModelReady();
988 } 988 }
989 989
990 void CertificateManagerHandler::CertificateManagerModelReady() { 990 void CertificateManagerHandler::CertificateManagerModelReady() {
991 base::FundamentalValue user_db_available_value(
992 certificate_manager_model_->is_user_db_available());
991 base::FundamentalValue tpm_available_value( 993 base::FundamentalValue tpm_available_value(
992 certificate_manager_model_->is_tpm_available()); 994 certificate_manager_model_->is_tpm_available());
993 web_ui()->CallJavascriptFunction("CertificateManager.onModelReady", 995 web_ui()->CallJavascriptFunction("CertificateManager.onModelReady",
996 user_db_available_value,
994 tpm_available_value); 997 tpm_available_value);
995 certificate_manager_model_->Refresh(); 998 certificate_manager_model_->Refresh();
996 } 999 }
997 1000
998 void CertificateManagerHandler::Populate(const base::ListValue* args) { 1001 void CertificateManagerHandler::Populate(const base::ListValue* args) {
999 if (certificate_manager_model_) { 1002 if (certificate_manager_model_) {
1000 // Already have a model, the webui must be re-loading. Just re-run the 1003 // Already have a model, the webui must be re-loading. Just re-run the
1001 // webui initialization. 1004 // webui initialization.
1002 CertificateManagerModelReady(); 1005 CertificateManagerModelReady();
1003 return; 1006 return;
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 title_value, 1131 title_value,
1129 error_value, 1132 error_value,
1130 cert_error_list); 1133 cert_error_list);
1131 } 1134 }
1132 1135
1133 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { 1136 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const {
1134 return web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(); 1137 return web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow();
1135 } 1138 }
1136 1139
1137 } // namespace options 1140 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/certificate_manager_browsertest.js ('k') | chromeos/cert_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698