electron/patches/common/chromium/ssl_security_state_tab_helper.patch

78 lines
2.5 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2018-09-21 00:30:26 +00:00
From: deepak1556 <hop2deep@gmail.com>
Date: Thu, 20 Sep 2018 17:50:34 -0700
Subject: ssl_security_state_tab_helper.patch
Allows populating security tab info for devtools in Electron.
diff --git a/chrome/browser/ssl/security_state_tab_helper.cc b/chrome/browser/ssl/security_state_tab_helper.cc
2019-05-13 18:49:01 +00:00
index 6ef33c5357cf08c1f17e9f20bd8d659bf4807d1c..a7062ccbb1c11c092e114fe498370f500c44c96b 100644
--- a/chrome/browser/ssl/security_state_tab_helper.cc
+++ b/chrome/browser/ssl/security_state_tab_helper.cc
2019-05-13 18:49:01 +00:00
@@ -13,10 +13,12 @@
2019-01-16 18:07:52 +00:00
#include "base/strings/pattern.h"
#include "base/strings/string_util.h"
#include "build/build_config.h"
+#if 0
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/browser/safe_browsing/ui_manager.h"
+#endif
#include "chrome/common/secure_origin_whitelist.h"
2019-05-13 18:49:01 +00:00
#include "components/omnibox/browser/omnibox_field_trial.h"
#include "components/omnibox/common/omnibox_features.h"
@@ -42,8 +44,10 @@
#endif // defined(OS_CHROMEOS)
2019-03-21 22:45:52 +00:00
#if defined(FULL_SAFE_BROWSING)
+#if 0
#include "chrome/browser/safe_browsing/chrome_password_protection_service.h"
#endif
2019-03-21 22:45:52 +00:00
+#endif
namespace {
2019-05-13 18:49:01 +00:00
@@ -63,7 +67,9 @@ void RecordSecurityLevel(
2018-10-24 23:25:48 +00:00
} // namespace
+#if 0
using safe_browsing::SafeBrowsingUIManager;
+#endif
SecurityStateTabHelper::SecurityStateTabHelper(
content::WebContents* web_contents)
2019-05-13 18:49:01 +00:00
@@ -129,6 +135,7 @@ void SecurityStateTabHelper::DidFinishNavigation(
UMA_HISTOGRAM_BOOLEAN("interstitial.ssl.visited_site_after_warning", true);
}
+#if 0
// Security indicator UI study (https://crbug.com/803501): Show a message in
// the console to reduce developer confusion about the experimental UI
// treatments for HTTPS pages with EV certificates.
2019-05-13 18:49:01 +00:00
@@ -156,6 +163,7 @@ void SecurityStateTabHelper::DidFinishNavigation(
"Validation is still valid.");
}
}
+#endif
}
void SecurityStateTabHelper::DidChangeVisibleSecurityState() {
2019-05-13 18:49:01 +00:00
@@ -179,6 +187,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
web_contents()->GetController().GetVisibleEntry();
if (!entry)
return security_state::MALICIOUS_CONTENT_STATUS_NONE;
+#if 0
safe_browsing::SafeBrowsingService* sb_service =
g_browser_process->safe_browsing_service();
if (!sb_service)
2019-05-13 18:49:01 +00:00
@@ -246,6 +255,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
break;
}
}
+#endif
return security_state::MALICIOUS_CONTENT_STATUS_NONE;
}