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

Unified Diff: chrome/browser/ui/page_info/page_info_ui.cc

Issue 2737413004: Add a Certificate Viewer link to the Page Info dropdown (Closed)
Patch Set: Add subviews Created 3 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
Index: chrome/browser/ui/page_info/page_info_ui.cc
diff --git a/chrome/browser/ui/page_info/page_info_ui.cc b/chrome/browser/ui/page_info/page_info_ui.cc
index bfba6cad6d634ab7c64e057c849458727ec58439..33c7d521e84d4ef9fb0d6966098054b072bfa51d 100644
--- a/chrome/browser/ui/page_info/page_info_ui.cc
+++ b/chrome/browser/ui/page_info/page_info_ui.cc
@@ -4,11 +4,15 @@
#include "chrome/browser/ui/page_info/page_info_ui.h"
+#include <utility>
+
+#include "base/command_line.h"
#include "base/macros.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/plugins/plugin_utils.h"
#include "chrome/browser/plugins/plugins_field_trial.h"
#include "chrome/common/chrome_features.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/theme_resources.h"
@@ -384,3 +388,15 @@ const gfx::Image& PageInfoUI::GetConnectionIcon(
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
return rb.GetNativeImageNamed(GetConnectionIconID(status));
}
+
+// static
+const gfx::Image& PageInfoUI::GetCertificateIcon() {
+ ResourceBundle& rb = ResourceBundle::GetSharedInstance();
+ return rb.GetNativeImageNamed(IDR_CERTIFICATE);
+}
+
+// static
+bool PageInfoUI::ShouldShowCertificateLink() {
+ return base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kShowCertLink);
+}

Powered by Google App Engine
This is Rietveld 408576698