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

Unified Diff: chrome/browser/ssl/chrome_security_state_model_client.cc

Issue 1473523002: Switch SecurityStateModel ownership to ChromeSecurityStateModelClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: delegate -> client Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ssl/chrome_security_state_model_client.h ('k') | chrome/browser/ssl/security_state_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/chrome_security_state_model_client.cc
diff --git a/chrome/browser/ssl/chrome_security_state_model_client.cc b/chrome/browser/ssl/chrome_security_state_model_client.cc
index b95f8865faac7ba590cf4e10ee9e2c7464472cfe..c848edbf987929f60944decaaaef81b594b41207 100644
--- a/chrome/browser/ssl/chrome_security_state_model_client.cc
+++ b/chrome/browser/ssl/chrome_security_state_model_client.cc
@@ -16,12 +16,22 @@
#include "content/public/common/ssl_status.h"
#include "net/cert/x509_certificate.h"
+DEFINE_WEB_CONTENTS_USER_DATA_KEY(ChromeSecurityStateModelClient);
+
ChromeSecurityStateModelClient::ChromeSecurityStateModelClient(
content::WebContents* web_contents)
- : web_contents_(web_contents) {}
+ : web_contents_(web_contents),
+ security_state_model_(new SecurityStateModel(web_contents)) {
+ security_state_model_->SetClient(this);
+}
ChromeSecurityStateModelClient::~ChromeSecurityStateModelClient() {}
+const SecurityStateModel::SecurityInfo&
+ChromeSecurityStateModelClient::GetSecurityInfo() const {
+ return security_state_model_->GetSecurityInfo();
+}
+
bool ChromeSecurityStateModelClient::RetrieveCert(
scoped_refptr<net::X509Certificate>* cert) {
content::NavigationEntry* entry =
« no previous file with comments | « chrome/browser/ssl/chrome_security_state_model_client.h ('k') | chrome/browser/ssl/security_state_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698