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

Unified Diff: chrome/browser/ui/website_settings/website_settings.cc

Issue 10829452: Auto select the connection tab of the Website Settings UI in case of an https error or mixed content (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build issues. Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/website_settings/website_settings.cc
diff --git a/chrome/browser/ui/website_settings/website_settings.cc b/chrome/browser/ui/website_settings/website_settings.cc
index d21a54cf43afba612a45ded6eb3a7c4358956dff..da5761620965b60c84a470032b77844f340e0280 100644
--- a/chrome/browser/ui/website_settings/website_settings.cc
+++ b/chrome/browser/ui/website_settings/website_settings.cc
@@ -417,6 +417,20 @@ void WebsiteSettings::Init(Profile* profile,
IDS_PAGE_INFO_SECURITY_TAB_RENEGOTIATION_MESSAGE);
}
}
+
+ // By default select the permissions tab that displays all the site
+ // permissions. In case of a connection error or an issue with the
+ // certificate presented by the website, select the connection tab to draw
+ // the user's attention to the issue. If the site does not provide a
+ // certificate because it was loaded over an unencrypted connection, don't
+ // select the connection tab.
+ WebsiteSettingsUI::TabId tab_id = WebsiteSettingsUI::TAB_ID_PERMISSIONS;
+ if (site_connection_status_ == SITE_CONNECTION_STATUS_ENCRYPTED_ERROR ||
+ site_connection_status_ == SITE_CONNECTION_STATUS_MIXED_CONTENT ||
+ site_identity_status_ == SITE_IDENTITY_STATUS_ERROR ||
+ site_identity_status_ == SITE_IDENTITY_STATUS_CERT_REVOCATION_UNKNOWN)
+ tab_id = WebsiteSettingsUI::TAB_ID_CONNECTION;
+ ui_->SetSelectedTab(tab_id);
}
void WebsiteSettings::PresentSitePermissions() {

Powered by Google App Engine
This is Rietveld 408576698