OLD | NEW |
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 #ifndef CHROME_BROWSER_WEBSITE_SETTINGS_MODEL_H_ | 5 #ifndef CHROME_BROWSER_WEBSITE_SETTINGS_MODEL_H_ |
6 #define CHROME_BROWSER_WEBSITE_SETTINGS_MODEL_H_ | 6 #define CHROME_BROWSER_WEBSITE_SETTINGS_MODEL_H_ |
7 | 7 |
8 #include "base/string16.h" | 8 #include "base/string16.h" |
9 #include "googleurl/src/gurl.h" | 9 #include "googleurl/src/gurl.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
| 12 class CertStore; |
12 struct SSLStatus; | 13 struct SSLStatus; |
13 } | 14 } |
14 | 15 |
15 class CertStore; | |
16 class Profile; | 16 class Profile; |
17 class TabContentsWrapper; | 17 class TabContentsWrapper; |
18 | 18 |
19 // The |WebsiteSettingsModel| provides information about the connection and the | 19 // The |WebsiteSettingsModel| provides information about the connection and the |
20 // identity of a website. The |WebsiteSettingsModel| is the backend for the | 20 // identity of a website. The |WebsiteSettingsModel| is the backend for the |
21 // WebsiteSettingsUI which displays this information. | 21 // WebsiteSettingsUI which displays this information. |
22 class WebsiteSettingsModel { | 22 class WebsiteSettingsModel { |
23 public: | 23 public: |
24 // Status of a connection to a website. | 24 // Status of a connection to a website. |
25 enum SiteConnectionStatus { | 25 enum SiteConnectionStatus { |
(...skipping 25 matching lines...) Expand all Loading... |
51 SITE_IDENTITY_STATUS_ERROR, | 51 SITE_IDENTITY_STATUS_ERROR, |
52 // The site is a trusted internal chrome page. | 52 // The site is a trusted internal chrome page. |
53 SITE_IDENTITY_STATUS_INTERNAL_PAGE, | 53 SITE_IDENTITY_STATUS_INTERNAL_PAGE, |
54 }; | 54 }; |
55 | 55 |
56 // Creates a WebsiteSettingsModel for the passed |url| using the given |ssl| | 56 // Creates a WebsiteSettingsModel for the passed |url| using the given |ssl| |
57 // status object to determine the status of the site's connection. | 57 // status object to determine the status of the site's connection. |
58 WebsiteSettingsModel(Profile* profile, | 58 WebsiteSettingsModel(Profile* profile, |
59 const GURL& url, | 59 const GURL& url, |
60 const content::SSLStatus& ssl, | 60 const content::SSLStatus& ssl, |
61 CertStore* cert_store); | 61 content::CertStore* cert_store); |
62 | 62 |
63 virtual ~WebsiteSettingsModel(); | 63 virtual ~WebsiteSettingsModel(); |
64 | 64 |
65 // Accessors. | 65 // Accessors. |
66 SiteConnectionStatus site_connection_status() const { | 66 SiteConnectionStatus site_connection_status() const { |
67 return site_connection_status_; | 67 return site_connection_status_; |
68 } | 68 } |
69 | 69 |
70 SiteIdentityStatus site_identity_status() const { | 70 SiteIdentityStatus site_identity_status() const { |
71 return site_identity_status_; | 71 return site_identity_status_; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // connection |site_connection_details_| contains encryption details, like | 103 // connection |site_connection_details_| contains encryption details, like |
104 // encryption strength and ssl protocol version. | 104 // encryption strength and ssl protocol version. |
105 string16 site_connection_details_; | 105 string16 site_connection_details_; |
106 | 106 |
107 // For websites that provided an EV certificate |orgainization_name_| contains | 107 // For websites that provided an EV certificate |orgainization_name_| contains |
108 // the organization name of the certificate. In all other cases | 108 // the organization name of the certificate. In all other cases |
109 // |organization_name| is an empty string. | 109 // |organization_name| is an empty string. |
110 string16 organization_name_; | 110 string16 organization_name_; |
111 | 111 |
112 // The |CertStore| provides all X509Certificates. | 112 // The |CertStore| provides all X509Certificates. |
113 CertStore* cert_store_; | 113 content::CertStore* cert_store_; |
114 | 114 |
115 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsModel); | 115 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsModel); |
116 }; | 116 }; |
117 | 117 |
118 #endif // CHROME_BROWSER_WEBSITE_SETTINGS_MODEL_H_ | 118 #endif // CHROME_BROWSER_WEBSITE_SETTINGS_MODEL_H_ |
OLD | NEW |