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

Unified Diff: chrome/browser/website_settings.cc

Issue 10163002: Add tabs UI to WebsiteSettingsUI (GTK only). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments (wtc). Created 8 years, 8 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
« no previous file with comments | « chrome/browser/website_settings.h ('k') | chrome/browser/website_settings_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/website_settings.cc
diff --git a/chrome/browser/website_settings.cc b/chrome/browser/website_settings.cc
index 5850576d5767b1391620568fd5bbcb09a3ca1eb0..d63ccf944741c70e8981129dad31572a42ea933a 100644
--- a/chrome/browser/website_settings.cc
+++ b/chrome/browser/website_settings.cc
@@ -84,31 +84,10 @@ WebsiteSettings::WebsiteSettings(
content_settings_(profile->GetHostContentSettingsMap()) {
ui_->SetPresenter(this);
Init(profile, url, ssl);
- // After initialization the status about the site's connection
- // and it's identity must be available.
- DCHECK_NE(site_identity_status_, SITE_IDENTITY_STATUS_UNKNOWN);
- DCHECK_NE(site_connection_status_, SITE_CONNECTION_STATUS_UNKNOWN);
-
- // TODO(markusheintz): Add the strings below to the grd file once a decision
- // has been made about the exact wording.
- std::string site_info;
- switch (site_identity_status_) {
- case WebsiteSettings::SITE_IDENTITY_STATUS_CERT:
- case WebsiteSettings::SITE_IDENTITY_STATUS_DNSSEC_CERT:
- site_info = "Identity verified";
- break;
- case WebsiteSettings::SITE_IDENTITY_STATUS_EV_CERT:
- site_info = UTF16ToUTF8(organization_name());
- site_info += " - Identity verified";
- break;
- default:
- site_info = "Identity not verified";
- break;
- }
- ui_->SetSiteInfo(site_info);
PresentSitePermissions();
PresentSiteData();
+ PresentSiteIdentity();
}
WebsiteSettings::~WebsiteSettings() {
@@ -445,6 +424,26 @@ void WebsiteSettings::PresentSiteData() {
ui_->SetCookieInfo(cookie_info_list);
}
+void WebsiteSettings::PresentSiteIdentity() {
+ // After initialization the status about the site's connection
+ // and it's identity must be available.
+ DCHECK_NE(site_identity_status_, SITE_IDENTITY_STATUS_UNKNOWN);
+ DCHECK_NE(site_connection_status_, SITE_CONNECTION_STATUS_UNKNOWN);
+ WebsiteSettingsUI::IdentityInfo info;
+ if (site_identity_status_ == SITE_IDENTITY_STATUS_EV_CERT)
+ info.site_identity = UTF16ToUTF8(organization_name());
+ else
+ info.site_identity = site_url_.host();
+
+ info.connection_status = site_connection_status_;
+ info.connection_status_description =
+ UTF16ToUTF8(site_connection_details_);
+ info.identity_status = site_identity_status_;
+ info.identity_status_description =
+ UTF16ToUTF8(site_identity_details_);
+ ui_->SetIdentityInfo(info);
+}
+
// static
void WebsiteSettings::Show(gfx::NativeWindow parent,
Profile* profile,
« no previous file with comments | « chrome/browser/website_settings.h ('k') | chrome/browser/website_settings_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698