84 lines
3.1 KiB
Diff
84 lines
3.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
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
|
|
index 887cdd11fbbd9df44edef1548a89891c5cf23cee..12da72449622289ec467d284f616bbf937ff1865 100644
|
|
--- a/chrome/browser/ssl/security_state_tab_helper.cc
|
|
+++ b/chrome/browser/ssl/security_state_tab_helper.cc
|
|
@@ -13,16 +13,20 @@
|
|
#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/lookalikes/safety_tips/reputation_web_contents_observer.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"
|
|
+#if 0
|
|
#include "components/omnibox/browser/omnibox_field_trial.h"
|
|
#include "components/omnibox/common/omnibox_features.h"
|
|
#include "components/password_manager/core/browser/password_manager_metrics_util.h"
|
|
#include "components/safe_browsing/buildflags.h"
|
|
+#endif
|
|
#include "components/security_state/content/content_utils.h"
|
|
#include "content/public/browser/browser_context.h"
|
|
#include "content/public/browser/navigation_entry.h"
|
|
@@ -44,7 +48,7 @@
|
|
#include "chrome/browser/chromeos/policy/policy_cert_service_factory.h"
|
|
#endif // defined(OS_CHROMEOS)
|
|
|
|
-#if BUILDFLAG(FULL_SAFE_BROWSING)
|
|
+#if 0
|
|
#include "chrome/browser/safe_browsing/chrome_password_protection_service.h"
|
|
#endif
|
|
|
|
@@ -66,8 +70,9 @@ void RecordSecurityLevel(
|
|
|
|
} // namespace
|
|
|
|
+#if 0
|
|
using password_manager::metrics_util::PasswordType;
|
|
-using safe_browsing::SafeBrowsingUIManager;
|
|
+#endif
|
|
|
|
SecurityStateTabHelper::SecurityStateTabHelper(
|
|
content::WebContents* web_contents)
|
|
@@ -89,6 +94,7 @@ SecurityStateTabHelper::GetVisibleSecurityState() const {
|
|
// information is still being initialized, thus no need to check for that.
|
|
state->malicious_content_status = GetMaliciousContentStatus();
|
|
|
|
+#if 0
|
|
safety_tips::ReputationWebContentsObserver* reputation_web_contents_observer =
|
|
safety_tips::ReputationWebContentsObserver::FromWebContents(
|
|
web_contents());
|
|
@@ -97,6 +103,7 @@ SecurityStateTabHelper::GetVisibleSecurityState() const {
|
|
? reputation_web_contents_observer
|
|
->GetSafetyTipStatusForVisibleNavigation()
|
|
: security_state::SafetyTipStatus::kUnknown;
|
|
+#endif
|
|
return state;
|
|
}
|
|
|
|
@@ -164,6 +171,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)
|
|
@@ -242,6 +250,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
|
|
break;
|
|
}
|
|
}
|
|
+#endif
|
|
return security_state::MALICIOUS_CONTENT_STATUS_NONE;
|
|
}
|
|
|