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

Side by Side Diff: chrome/browser/ui/website_settings/website_settings_ui.cc

Issue 2244243002: Adjust WebsiteSettings statuses for subresources with cert errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months 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 (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/grit/chromium_strings.h" 8 #include "chrome/grit/chromium_strings.h"
9 #include "chrome/grit/generated_resources.h" 9 #include "chrome/grit/generated_resources.h"
10 #include "components/content_settings/core/browser/plugins_field_trial.h" 10 #include "components/content_settings/core/browser/plugins_field_trial.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 144 }
145 145
146 WebsiteSettingsUI::IdentityInfo::~IdentityInfo() {} 146 WebsiteSettingsUI::IdentityInfo::~IdentityInfo() {}
147 147
148 base::string16 WebsiteSettingsUI::IdentityInfo::GetSecuritySummary() const { 148 base::string16 WebsiteSettingsUI::IdentityInfo::GetSecuritySummary() const {
149 switch (identity_status) { 149 switch (identity_status) {
150 case WebsiteSettings::SITE_IDENTITY_STATUS_CERT: 150 case WebsiteSettings::SITE_IDENTITY_STATUS_CERT:
151 case WebsiteSettings::SITE_IDENTITY_STATUS_EV_CERT: 151 case WebsiteSettings::SITE_IDENTITY_STATUS_EV_CERT:
152 case WebsiteSettings::SITE_IDENTITY_STATUS_CERT_REVOCATION_UNKNOWN: 152 case WebsiteSettings::SITE_IDENTITY_STATUS_CERT_REVOCATION_UNKNOWN:
153 switch (connection_status) { 153 switch (connection_status) {
154 case WebsiteSettings::SITE_CONNECTION_STATUS_MIXED_CONTENT: 154 case WebsiteSettings::SITE_CONNECTION_STATUS_INSECURE_CONTENT:
155 return l10n_util::GetStringUTF16( 155 return l10n_util::GetStringUTF16(
156 IDS_WEBSITE_SETTINGS_MIXED_PASSIVE_CONTENT); 156 IDS_WEBSITE_SETTINGS_INSECURE_PASSIVE_CONTENT);
157 case WebsiteSettings::SITE_CONNECTION_STATUS_MIXED_SCRIPT: 157 case WebsiteSettings::SITE_CONNECTION_STATUS_INSECURE_SCRIPT:
158 return l10n_util::GetStringUTF16( 158 return l10n_util::GetStringUTF16(
159 IDS_WEBSITE_SETTINGS_MIXED_ACTIVE_CONTENT); 159 IDS_WEBSITE_SETTINGS_INSECURE_ACTIVE_CONTENT);
160 default: 160 default:
161 return l10n_util::GetStringUTF16( 161 return l10n_util::GetStringUTF16(
162 IDS_WEBSITE_SETTINGS_SECURE_TRANSPORT); 162 IDS_WEBSITE_SETTINGS_SECURE_TRANSPORT);
163 } 163 }
164 case WebsiteSettings:: 164 case WebsiteSettings::
165 SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM_MINOR: 165 SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM_MINOR:
166 case WebsiteSettings:: 166 case WebsiteSettings::
167 SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM_MAJOR: 167 SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM_MAJOR:
168 return l10n_util::GetStringUTF16( 168 return l10n_util::GetStringUTF16(
169 IDS_WEBSITE_DEPRECATED_SIGNATURE_ALGORITHM); 169 IDS_WEBSITE_DEPRECATED_SIGNATURE_ALGORITHM);
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 int WebsiteSettingsUI::GetConnectionIconID( 343 int WebsiteSettingsUI::GetConnectionIconID(
344 WebsiteSettings::SiteConnectionStatus status) { 344 WebsiteSettings::SiteConnectionStatus status) {
345 int resource_id = IDR_PAGEINFO_INFO; 345 int resource_id = IDR_PAGEINFO_INFO;
346 switch (status) { 346 switch (status) {
347 case WebsiteSettings::SITE_CONNECTION_STATUS_UNKNOWN: 347 case WebsiteSettings::SITE_CONNECTION_STATUS_UNKNOWN:
348 case WebsiteSettings::SITE_CONNECTION_STATUS_INTERNAL_PAGE: 348 case WebsiteSettings::SITE_CONNECTION_STATUS_INTERNAL_PAGE:
349 break; 349 break;
350 case WebsiteSettings::SITE_CONNECTION_STATUS_ENCRYPTED: 350 case WebsiteSettings::SITE_CONNECTION_STATUS_ENCRYPTED:
351 resource_id = IDR_PAGEINFO_GOOD; 351 resource_id = IDR_PAGEINFO_GOOD;
352 break; 352 break;
353 case WebsiteSettings::SITE_CONNECTION_STATUS_MIXED_CONTENT: 353 case WebsiteSettings::SITE_CONNECTION_STATUS_INSECURE_CONTENT:
354 resource_id = IDR_PAGEINFO_WARNING_MINOR; 354 resource_id = IDR_PAGEINFO_WARNING_MINOR;
355 break; 355 break;
356 case WebsiteSettings::SITE_CONNECTION_STATUS_UNENCRYPTED: 356 case WebsiteSettings::SITE_CONNECTION_STATUS_UNENCRYPTED:
357 resource_id = IDR_PAGEINFO_WARNING_MAJOR; 357 resource_id = IDR_PAGEINFO_WARNING_MAJOR;
358 break; 358 break;
359 case WebsiteSettings::SITE_CONNECTION_STATUS_MIXED_SCRIPT: 359 case WebsiteSettings::SITE_CONNECTION_STATUS_INSECURE_SCRIPT:
360 case WebsiteSettings::SITE_CONNECTION_STATUS_ENCRYPTED_ERROR: 360 case WebsiteSettings::SITE_CONNECTION_STATUS_ENCRYPTED_ERROR:
361 resource_id = IDR_PAGEINFO_BAD; 361 resource_id = IDR_PAGEINFO_BAD;
362 break; 362 break;
363 } 363 }
364 return resource_id; 364 return resource_id;
365 } 365 }
366 366
367 // static 367 // static
368 const gfx::Image& WebsiteSettingsUI::GetConnectionIcon( 368 const gfx::Image& WebsiteSettingsUI::GetConnectionIcon(
369 WebsiteSettings::SiteConnectionStatus status) { 369 WebsiteSettings::SiteConnectionStatus status) {
370 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 370 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
371 return rb.GetNativeImageNamed(GetConnectionIconID(status)); 371 return rb.GetNativeImageNamed(GetConnectionIconID(status));
372 } 372 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698