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

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

Issue 2107123002: Convert OSX Page Info Bubble to Material Design (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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.h
diff --git a/chrome/browser/ui/website_settings/website_settings_ui.h b/chrome/browser/ui/website_settings/website_settings_ui.h
index 2a6918e2d6478795400d24bdbc5a113e022e3294..09767ca413cfd069316987c4c70486c414a6a3f2 100644
--- a/chrome/browser/ui/website_settings/website_settings_ui.h
+++ b/chrome/browser/ui/website_settings/website_settings_ui.h
@@ -44,6 +44,26 @@ class WebsiteSettingsUI {
NUM_TAB_IDS,
};
+ // The security summary is styled depending on the security state. At the
+ // moment, the only styling we apply is color, but it could also include e.g.
+ // bolding.
+ enum SecuritySummaryStyle {
+ STYLE_DEFAULT = 0,
+ STYLE_GREEN,
+ STYLE_YELLOW,
+ STYLE_RED,
+ };
+
+ struct SecurityDescription {
+ // A one-line summary of the security state.
+ base::string16 summary;
+ // How to style the summary.
+ SecuritySummaryStyle summary_style;
+ // A short paragraph with more details about the state, and how
+ // the user should treat it.
+ base::string16 details;
+ };
+
// |CookieInfo| contains information about the cookies from a specific source.
// A source can for example be a specific origin or an entire wildcard domain.
struct CookieInfo {
@@ -99,10 +119,11 @@ class WebsiteSettingsUI {
std::string site_identity;
// Status of the site's identity.
WebsiteSettings::SiteIdentityStatus identity_status;
- // Helper to get the status text to display to the user.
+ // Helper to get security description info to display to the user.
+ std::unique_ptr<SecurityDescription> GetSecurityDescription() const;
+ // Deprecated method go get just the summary from GetSecurityDescription().
base::string16 GetSecuritySummary() const;
- // Textual description of the site's identity status that is displayed to
- // the user.
+ // Helper to get the status text style (i.e. color).
felt 2016/06/30 05:39:24 This comment seems mismatched, it is not above a h
lgarron 2016/07/08 17:47:08 Woops, I deleted the old comment instead of a temp
std::string identity_status_description;
// The ID is the server certificate of a secure connection or 0.
int cert_id;

Powered by Google App Engine
This is Rietveld 408576698