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

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: Rebase, update tooltip 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 2ff9c63e849933dd04e175bc1119eee83e0e3f03..235b77e079ce8657fbda7f3947806550fa50fef6 100644
--- a/chrome/browser/ui/page_info/page_info_ui.cc
+++ b/chrome/browser/ui/page_info/page_info_ui.cc
@@ -4,6 +4,9 @@
#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/permissions/permission_manager.h"
@@ -12,6 +15,7 @@
#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"
@@ -448,3 +452,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);
+}
« no previous file with comments | « chrome/browser/ui/page_info/page_info_ui.h ('k') | chrome/browser/ui/views/page_info/page_info_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698