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

Side by Side Diff: chrome/browser/ssl/chrome_security_state_model_delegate.h

Issue 1440303002: Componentize SecurityStateModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android/cros fixes 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_SSL_CHROME_SECURITY_STATE_MODEL_DELEGATE_H_
6 #define CHROME_BROWSER_SSL_CHROME_SECURITY_STATE_MODEL_DELEGATE_H_
7
8 #include "base/macros.h"
9 #include "components/security_state/security_state_model.h"
10 #include "components/security_state/security_state_model_delegate.h"
11 #include "content/public/browser/web_contents_user_data.h"
12 #include "content/public/common/security_style.h"
13 #include "content/public/common/ssl_status.h"
14 #include "net/cert/cert_status_flags.h"
15 #include "net/cert/sct_status_flags.h"
16 #include "net/cert/x509_certificate.h"
17
18 class Profile;
19
20 // Implements security_state::SecurityStateModelDelegate using a
21 // content::SSLStatus from a particular WebContents.
22 class ChromeSecurityStateModelDelegate
23 : public content::WebContentsUserData<ChromeSecurityStateModelDelegate>,
24 public security_state::SecurityStateModelDelegate {
25 public:
26 ~ChromeSecurityStateModelDelegate() override;
27
28 const security_state::SecurityInfo& GetSecurityInfo() const;
29
30 // SecurityStateModelDelegate overrides
31 bool VisibleSecurityStateChanged() override;
32 bool RetrieveCert(scoped_refptr<net::X509Certificate>* cert) override;
33 security_state::SecurityLevel GetInitialSecurityLevel() override;
34 security_state::SecurityLevel GetSecurityLevelForNonSecure(
35 const GURL& url) override;
36 bool UsedKnownMITMCertificate() override;
37 int GetCertId() override;
38 net::CertStatus GetCertStatus() override;
39 int GetConnectionStatus() override;
40 int GetSecurityBits() override;
41 const GURL& GetURL() override;
42 bool RanMixedContent() override;
43 bool DisplayedMixedContent() override;
44 void GetSCTVerifyStatuses(
45 std::vector<net::ct::SCTVerifyStatus>* sct_verify_statuses) override;
46
47 private:
48 explicit ChromeSecurityStateModelDelegate(content::WebContents* web_contents);
49 friend class content::WebContentsUserData<ChromeSecurityStateModelDelegate>;
50
51 content::WebContents* web_contents_;
52 scoped_ptr<security_state::SecurityStateModel> security_state_model_;
53 content::SSLStatus visible_ssl_status_;
54 GURL visible_url_;
55 GURL empty_url_;
56
57 DISALLOW_COPY_AND_ASSIGN(ChromeSecurityStateModelDelegate);
58 };
59
60 #endif // CHROME_BROWSER_SSL_CHROME_SECURITY_STATE_MODEL_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698