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

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

Issue 516703002: Replaced the current WebsiteSettings dialog with a new PageInfo dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed changes to chromium_strings Created 6 years, 2 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_ui.cc
diff --git a/chrome/browser/ui/website_settings/website_settings_ui.cc b/chrome/browser/ui/website_settings/website_settings_ui.cc
index 9c996f37f04df8ae560bde673d178a7f44323964..b22f4fa92158a8fa268a8fe94ed6a7a73416d395 100644
--- a/chrome/browser/ui/website_settings/website_settings_ui.cc
+++ b/chrome/browser/ui/website_settings/website_settings_ui.cc
@@ -4,7 +4,8 @@
#include "chrome/browser/ui/website_settings/website_settings_ui.h"
-#include "chrome/grit/generated_resources.h"
+#include "grit/chromium_strings.h"
Lei Zhang 2014/10/07 23:30:31 Please use chrome/grit.
sashab 2014/10/08 00:04:21 Sure, I didn't know this was a thing. Updated all
+#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
@@ -336,3 +337,25 @@ const gfx::Image& WebsiteSettingsUI::GetFirstVisitIcon(
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
return rb.GetNativeImageNamed(GetFirstVisitIconID(first_visit));
}
+
+// static
+int WebsiteSettingsUI::GetConnectionSummaryMessageID(
+ WebsiteSettings::SiteConnectionStatus status) {
+ switch (status) {
+ case WebsiteSettings::SITE_CONNECTION_STATUS_UNKNOWN:
+ return IDS_PAGE_INFO_UNENCRYPTED_CONNECTION_SUMMARY_TEXT;
+ case WebsiteSettings::SITE_CONNECTION_STATUS_ENCRYPTED:
+ return IDS_PAGE_INFO_ENCRYPTED_CONNECTION_SUMMARY_TEXT;
+ case WebsiteSettings::SITE_CONNECTION_STATUS_MIXED_CONTENT:
+ return IDS_PAGE_INFO_MIXED_CONTENT_CONNECTION_SUMMARY_TEXT;
+ case WebsiteSettings::SITE_CONNECTION_STATUS_UNENCRYPTED:
+ return IDS_PAGE_INFO_UNENCRYPTED_CONNECTION_SUMMARY_TEXT;
+ case WebsiteSettings::SITE_CONNECTION_STATUS_ENCRYPTED_ERROR:
+ return IDS_PAGE_INFO_UNENCRYPTED_CONNECTION_SUMMARY_TEXT;
+ case WebsiteSettings::SITE_CONNECTION_STATUS_INTERNAL_PAGE:
+ return IDS_PAGE_INFO_INTERNAL_PAGE;
+ default:
+ NOTREACHED();
+ return 0;
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698