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

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

Issue 2846913002: Add a Certificate Viewer link to the Page Info dropdown (Closed)
Patch Set: Fix merge conflict 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..72b3f360759deea4bfc429e5bc1ae05ce6f7d736 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"
@@ -23,6 +27,12 @@
#include "ui/gfx/image/image.h"
#include "url/gurl.h"
+#if !defined(OS_ANDROID)
+#include "chrome/app/vector_icons/vector_icons.h"
+#include "ui/gfx/color_palette.h"
+#include "ui/gfx/paint_vector_icon.h"
+#endif
+
namespace {
const int kInvalidResourceID = -1;
@@ -448,3 +458,16 @@ const gfx::Image& PageInfoUI::GetConnectionIcon(
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
return rb.GetNativeImageNamed(GetConnectionIconID(status));
}
+
+#if !defined(OS_ANDROID)
+// static
+const gfx::ImageSkia PageInfoUI::GetCertificateIcon() {
+ return gfx::CreateVectorIcon(kCertificateIcon, 16, gfx::kChromeIconGrey);
+}
+#endif
+
+// 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