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

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

Issue 1539043002: Pull SecurityStateModel out into a component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android fix Created 5 years 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROME_BROWSER_SSL_CHROME_SECURITY_STATE_MODEL_CLIENT_H_ 5 #ifndef CHROME_BROWSER_SSL_CHROME_SECURITY_STATE_MODEL_CLIENT_H_
6 #define CHROME_BROWSER_SSL_CHROME_SECURITY_STATE_MODEL_CLIENT_H_ 6 #define CHROME_BROWSER_SSL_CHROME_SECURITY_STATE_MODEL_CLIENT_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/ssl/security_state_model.h" 9 #include "components/security_state/security_state_model.h"
10 #include "chrome/browser/ssl/security_state_model_client.h" 10 #include "components/security_state/security_state_model_client.h"
11 #include "content/public/browser/web_contents_user_data.h" 11 #include "content/public/browser/web_contents_user_data.h"
12 12
13 namespace content { 13 namespace content {
14 class WebContents; 14 class WebContents;
15 } // namespace content 15 } // namespace content
16 16
17 // Uses a WebContents to provide a SecurityStateModel with the 17 // Uses a WebContents to provide a SecurityStateModel with the
18 // information that it needs to determine the page's security status. 18 // information that it needs to determine the page's security status.
19 class ChromeSecurityStateModelClient 19 class ChromeSecurityStateModelClient
20 : public SecurityStateModelClient, 20 : public security_state::SecurityStateModelClient,
21 public content::WebContentsUserData<ChromeSecurityStateModelClient> { 21 public content::WebContentsUserData<ChromeSecurityStateModelClient> {
22 public: 22 public:
23 ~ChromeSecurityStateModelClient() override; 23 ~ChromeSecurityStateModelClient() override;
24 24
25 const SecurityStateModel::SecurityInfo& GetSecurityInfo() const; 25 const security_state::SecurityStateModel::SecurityInfo& GetSecurityInfo()
felt 2015/12/22 17:29:08 nit: this is repeated often enough that it might m
tfarina 2015/12/22 17:30:30 certainly, you won't be doing this in a header fil
felt 2015/12/22 17:34:30 sorry, i meant to make this comment on the next (.
estark 2015/12/22 18:31:12 Done in .cc files where it's used more than a hand
26 const;
26 27
27 // SecurityStateModelClient: 28 // SecurityStateModelClient:
28 void GetVisibleSecurityState( 29 void GetVisibleSecurityState(
29 SecurityStateModel::VisibleSecurityState* state) override; 30 security_state::SecurityStateModel::VisibleSecurityState* state) override;
30 bool RetrieveCert(scoped_refptr<net::X509Certificate>* cert) override; 31 bool RetrieveCert(scoped_refptr<net::X509Certificate>* cert) override;
31 bool UsedPolicyInstalledCertificate() override; 32 bool UsedPolicyInstalledCertificate() override;
32 bool IsOriginSecure(const GURL& url) override; 33 bool IsOriginSecure(const GURL& url) override;
33 34
34 private: 35 private:
35 explicit ChromeSecurityStateModelClient(content::WebContents* web_contents); 36 explicit ChromeSecurityStateModelClient(content::WebContents* web_contents);
36 friend class content::WebContentsUserData<ChromeSecurityStateModelClient>; 37 friend class content::WebContentsUserData<ChromeSecurityStateModelClient>;
37 38
38 content::WebContents* web_contents_; 39 content::WebContents* web_contents_;
39 scoped_ptr<SecurityStateModel> security_state_model_; 40 scoped_ptr<security_state::SecurityStateModel> security_state_model_;
40 41
41 DISALLOW_COPY_AND_ASSIGN(ChromeSecurityStateModelClient); 42 DISALLOW_COPY_AND_ASSIGN(ChromeSecurityStateModelClient);
42 }; 43 };
43 44
44 #endif // CHROME_BROWSER_SSL_CHROME_SECURITY_STATE_MODEL_CLIENT_H_ 45 #endif // CHROME_BROWSER_SSL_CHROME_SECURITY_STATE_MODEL_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/ui/simple_web_view_dialog.cc ('k') | chrome/browser/ssl/chrome_security_state_model_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698