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 #include "chrome/browser/ui/website_settings/website_settings_ui.h" | 5 #include "chrome/browser/ui/website_settings/website_settings_ui.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 8 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
9 #include "chrome/browser/plugins/plugin_utils.h" | 9 #include "chrome/browser/plugins/plugin_utils.h" |
10 #include "chrome/browser/plugins/plugins_field_trial.h" | 10 #include "chrome/browser/plugins/plugins_field_trial.h" |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 return CreateSecurityDescription(IDS_WEBSITE_SETTINGS_INTERNAL_PAGE, | 163 return CreateSecurityDescription(IDS_WEBSITE_SETTINGS_INTERNAL_PAGE, |
164 IDS_WEBSITE_SETTINGS_INTERNAL_PAGE); | 164 IDS_WEBSITE_SETTINGS_INTERNAL_PAGE); |
165 case WebsiteSettings::SITE_IDENTITY_STATUS_CERT: | 165 case WebsiteSettings::SITE_IDENTITY_STATUS_CERT: |
166 case WebsiteSettings::SITE_IDENTITY_STATUS_EV_CERT: | 166 case WebsiteSettings::SITE_IDENTITY_STATUS_EV_CERT: |
167 case WebsiteSettings::SITE_IDENTITY_STATUS_CERT_REVOCATION_UNKNOWN: | 167 case WebsiteSettings::SITE_IDENTITY_STATUS_CERT_REVOCATION_UNKNOWN: |
168 case WebsiteSettings::SITE_IDENTITY_STATUS_ADMIN_PROVIDED_CERT: | 168 case WebsiteSettings::SITE_IDENTITY_STATUS_ADMIN_PROVIDED_CERT: |
169 switch (connection_status) { | 169 switch (connection_status) { |
170 case WebsiteSettings:: | 170 case WebsiteSettings:: |
171 SITE_CONNECTION_STATUS_INSECURE_ACTIVE_SUBRESOURCE: | 171 SITE_CONNECTION_STATUS_INSECURE_ACTIVE_SUBRESOURCE: |
172 return CreateSecurityDescription( | 172 return CreateSecurityDescription( |
173 IDS_WEBSITE_SETTINGS_NOT_SECURE_SUMMARY, | 173 IDS_PAGEINFO_NOT_SECURE_SUMMARY, |
174 IDS_WEBSITE_SETTINGS_NOT_SECURE_DETAILS); | 174 IDS_PAGEINFO_NOT_SECURE_DETAILS); |
175 case WebsiteSettings:: | 175 case WebsiteSettings:: |
176 SITE_CONNECTION_STATUS_INSECURE_PASSIVE_SUBRESOURCE: | 176 SITE_CONNECTION_STATUS_INSECURE_PASSIVE_SUBRESOURCE: |
177 return CreateSecurityDescription( | 177 return CreateSecurityDescription( |
178 IDS_WEBSITE_SETTINGS_MIXED_CONTENT_SUMMARY, | 178 IDS_PAGEINFO_MIXED_CONTENT_SUMMARY, |
179 IDS_WEBSITE_SETTINGS_MIXED_CONTENT_DETAILS); | 179 IDS_PAGEINFO_MIXED_CONTENT_DETAILS); |
180 default: | 180 default: |
181 return CreateSecurityDescription(IDS_WEBSITE_SETTINGS_SECURE_SUMMARY, | 181 return CreateSecurityDescription(IDS_PAGEINFO_SECURE_SUMMARY, |
182 IDS_WEBSITE_SETTINGS_SECURE_DETAILS); | 182 IDS_PAGEINFO_SECURE_DETAILS); |
183 } | 183 } |
184 case WebsiteSettings::SITE_IDENTITY_STATUS_MALWARE: | 184 case WebsiteSettings::SITE_IDENTITY_STATUS_MALWARE: |
185 return CreateSecurityDescription(IDS_WEBSITE_SETTINGS_MALWARE_SUMMARY, | 185 return CreateSecurityDescription(IDS_PAGEINFO_MALWARE_SUMMARY, |
186 IDS_WEBSITE_SETTINGS_MALWARE_DETAILS); | 186 IDS_PAGEINFO_MALWARE_DETAILS); |
187 case WebsiteSettings::SITE_IDENTITY_STATUS_SOCIAL_ENGINEERING: | 187 case WebsiteSettings::SITE_IDENTITY_STATUS_SOCIAL_ENGINEERING: |
188 return CreateSecurityDescription( | 188 return CreateSecurityDescription( |
189 IDS_WEBSITE_SETTINGS_SOCIAL_ENGINEERING_SUMMARY, | 189 IDS_PAGEINFO_SOCIAL_ENGINEERING_SUMMARY, |
190 IDS_WEBSITE_SETTINGS_SOCIAL_ENGINEERING_DETAILS); | 190 IDS_PAGEINFO_SOCIAL_ENGINEERING_DETAILS); |
191 case WebsiteSettings::SITE_IDENTITY_STATUS_UNWANTED_SOFTWARE: | 191 case WebsiteSettings::SITE_IDENTITY_STATUS_UNWANTED_SOFTWARE: |
192 return CreateSecurityDescription( | 192 return CreateSecurityDescription( |
193 IDS_WEBSITE_SETTINGS_UNWANTED_SOFTWARE_SUMMARY, | 193 IDS_PAGEINFO_UNWANTED_SOFTWARE_SUMMARY, |
194 IDS_WEBSITE_SETTINGS_UNWANTED_SOFTWARE_DETAILS); | 194 IDS_PAGEINFO_UNWANTED_SOFTWARE_DETAILS); |
195 case WebsiteSettings::SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM: | 195 case WebsiteSettings::SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM: |
196 case WebsiteSettings::SITE_IDENTITY_STATUS_UNKNOWN: | 196 case WebsiteSettings::SITE_IDENTITY_STATUS_UNKNOWN: |
197 case WebsiteSettings::SITE_IDENTITY_STATUS_NO_CERT: | 197 case WebsiteSettings::SITE_IDENTITY_STATUS_NO_CERT: |
198 default: | 198 default: |
199 return CreateSecurityDescription(IDS_WEBSITE_SETTINGS_NOT_SECURE_SUMMARY, | 199 return CreateSecurityDescription(IDS_PAGEINFO_NOT_SECURE_SUMMARY, |
200 IDS_WEBSITE_SETTINGS_NOT_SECURE_DETAILS); | 200 IDS_PAGEINFO_NOT_SECURE_DETAILS); |
201 } | 201 } |
202 } | 202 } |
203 | 203 |
204 WebsiteSettingsUI::~WebsiteSettingsUI() { | 204 WebsiteSettingsUI::~WebsiteSettingsUI() { |
205 } | 205 } |
206 | 206 |
207 // static | 207 // static |
208 base::string16 WebsiteSettingsUI::PermissionTypeToUIString( | 208 base::string16 WebsiteSettingsUI::PermissionTypeToUIString( |
209 ContentSettingsType type) { | 209 ContentSettingsType type) { |
210 for (const PermissionsUIInfo& info : kPermissionsUIInfo) { | 210 for (const PermissionsUIInfo& info : kPermissionsUIInfo) { |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 } | 386 } |
387 return resource_id; | 387 return resource_id; |
388 } | 388 } |
389 | 389 |
390 // static | 390 // static |
391 const gfx::Image& WebsiteSettingsUI::GetConnectionIcon( | 391 const gfx::Image& WebsiteSettingsUI::GetConnectionIcon( |
392 WebsiteSettings::SiteConnectionStatus status) { | 392 WebsiteSettings::SiteConnectionStatus status) { |
393 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 393 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
394 return rb.GetNativeImageNamed(GetConnectionIconID(status)); | 394 return rb.GetNativeImageNamed(GetConnectionIconID(status)); |
395 } | 395 } |
OLD | NEW |