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

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

Issue 1473523002: Switch SecurityStateModel ownership to ChromeSecurityStateModelClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
Index: chrome/browser/ssl/chrome_security_state_model_client.h
diff --git a/chrome/browser/ssl/chrome_security_state_model_client.h b/chrome/browser/ssl/chrome_security_state_model_client.h
index 4889b9c3217ec254763327ec3c6a308e1273fbfa..7298ff27088cca32a41a2920df07112cdf7d97bc 100644
--- a/chrome/browser/ssl/chrome_security_state_model_client.h
+++ b/chrome/browser/ssl/chrome_security_state_model_client.h
@@ -6,7 +6,9 @@
#define CHROME_BROWSER_SSL_CHROME_SECURITY_STATE_MODEL_CLIENT_H_
#include "base/macros.h"
+#include "chrome/browser/ssl/security_state_model.h"
#include "chrome/browser/ssl/security_state_model_client.h"
+#include "content/public/browser/web_contents_user_data.h"
namespace content {
class WebContents;
@@ -14,17 +16,24 @@ class WebContents;
// Uses a WebContents to provide a SecurityStateModel with the
// information that it needs to determine the page's security status.
-class ChromeSecurityStateModelClient : public SecurityStateModelClient {
+class ChromeSecurityStateModelClient
+ : public SecurityStateModelClient,
+ public content::WebContentsUserData<ChromeSecurityStateModelClient> {
public:
- explicit ChromeSecurityStateModelClient(content::WebContents* web_contents);
~ChromeSecurityStateModelClient() override;
+ const SecurityStateModel::SecurityInfo& GetSecurityInfo() const;
+
// SecurityStateModelClient:
bool RetrieveCert(scoped_refptr<net::X509Certificate>* cert) override;
bool UsedPolicyInstalledCertificate() override;
private:
+ explicit ChromeSecurityStateModelClient(content::WebContents* web_contents);
+ friend class content::WebContentsUserData<ChromeSecurityStateModelClient>;
+
content::WebContents* web_contents_;
+ scoped_ptr<SecurityStateModel> security_state_model_;
DISALLOW_COPY_AND_ASSIGN(ChromeSecurityStateModelClient);
};

Powered by Google App Engine
This is Rietveld 408576698