refactor: remove ssl_security_state_tab_helper.patch (#29196)
This commit is contained in:
parent
aeb566c38e
commit
dcbabcb23c
5 changed files with 4 additions and 124 deletions
1
BUILD.gn
1
BUILD.gn
|
@ -335,6 +335,7 @@ source_set("electron_lib") {
|
||||||
"//components/network_session_configurator/common",
|
"//components/network_session_configurator/common",
|
||||||
"//components/pref_registry",
|
"//components/pref_registry",
|
||||||
"//components/prefs",
|
"//components/prefs",
|
||||||
|
"//components/security_state/content",
|
||||||
"//components/upload_list",
|
"//components/upload_list",
|
||||||
"//components/user_prefs",
|
"//components/user_prefs",
|
||||||
"//components/viz/host",
|
"//components/viz/host",
|
||||||
|
|
|
@ -43,8 +43,6 @@ static_library("chrome") {
|
||||||
"//chrome/browser/predictors/proxy_lookup_client_impl.h",
|
"//chrome/browser/predictors/proxy_lookup_client_impl.h",
|
||||||
"//chrome/browser/predictors/resolve_host_client_impl.cc",
|
"//chrome/browser/predictors/resolve_host_client_impl.cc",
|
||||||
"//chrome/browser/predictors/resolve_host_client_impl.h",
|
"//chrome/browser/predictors/resolve_host_client_impl.h",
|
||||||
"//chrome/browser/ssl/security_state_tab_helper.cc",
|
|
||||||
"//chrome/browser/ssl/security_state_tab_helper.h",
|
|
||||||
"//chrome/browser/ui/views/autofill/autofill_popup_view_utils.cc",
|
"//chrome/browser/ui/views/autofill/autofill_popup_view_utils.cc",
|
||||||
"//chrome/browser/ui/views/autofill/autofill_popup_view_utils.h",
|
"//chrome/browser/ui/views/autofill/autofill_popup_view_utils.h",
|
||||||
"//extensions/browser/app_window/size_constraints.cc",
|
"//extensions/browser/app_window/size_constraints.cc",
|
||||||
|
@ -80,7 +78,6 @@ static_library("chrome") {
|
||||||
"//components/keyed_service/content",
|
"//components/keyed_service/content",
|
||||||
"//components/paint_preview/buildflags",
|
"//components/paint_preview/buildflags",
|
||||||
"//components/proxy_config",
|
"//components/proxy_config",
|
||||||
"//components/security_state/content",
|
|
||||||
"//content/public/browser",
|
"//content/public/browser",
|
||||||
"//services/strings",
|
"//services/strings",
|
||||||
]
|
]
|
||||||
|
|
|
@ -33,7 +33,6 @@ mas_disable_remote_accessibility.patch
|
||||||
mas_disable_custom_window_frame.patch
|
mas_disable_custom_window_frame.patch
|
||||||
chrome_key_systems.patch
|
chrome_key_systems.patch
|
||||||
add_didinstallconditionalfeatures.patch
|
add_didinstallconditionalfeatures.patch
|
||||||
ssl_security_state_tab_helper.patch
|
|
||||||
desktop_media_list.patch
|
desktop_media_list.patch
|
||||||
proxy_config_monitor.patch
|
proxy_config_monitor.patch
|
||||||
gritsettings_resource_ids.patch
|
gritsettings_resource_ids.patch
|
||||||
|
|
|
@ -1,112 +0,0 @@
|
||||||
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 33d13d4f01cd333bd510e49d62944431df15417a..677239abeee39d1f6a2b8886597b989ec993bd1c 100644
|
|
||||||
--- a/chrome/browser/ssl/security_state_tab_helper.cc
|
|
||||||
+++ b/chrome/browser/ssl/security_state_tab_helper.cc
|
|
||||||
@@ -7,6 +7,7 @@
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include "base/bind.h"
|
|
||||||
+#include "base/command_line.h"
|
|
||||||
#include "base/feature_list.h"
|
|
||||||
#include "base/metrics/field_trial_params.h"
|
|
||||||
#include "base/metrics/histogram_macros.h"
|
|
||||||
@@ -14,24 +15,28 @@
|
|
||||||
#include "base/strings/string_util.h"
|
|
||||||
#include "build/build_config.h"
|
|
||||||
#include "build/chromeos_buildflags.h"
|
|
||||||
+#if 0
|
|
||||||
#include "chrome/browser/browser_process.h"
|
|
||||||
#include "chrome/browser/profiles/profile.h"
|
|
||||||
#include "chrome/browser/reputation/reputation_web_contents_observer.h"
|
|
||||||
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
|
|
||||||
#include "chrome/browser/safe_browsing/ui_manager.h"
|
|
||||||
#include "chrome/browser/ssl/known_interception_disclosure_infobar_delegate.h"
|
|
||||||
+#endif
|
|
||||||
#include "chrome/common/chrome_features.h"
|
|
||||||
#include "chrome/common/chrome_switches.h"
|
|
||||||
#include "chrome/common/pref_names.h"
|
|
||||||
#include "chrome/common/secure_origin_allowlist.h"
|
|
||||||
#include "components/autofill/core/common/autofill_features.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/prefs/pref_service.h"
|
|
||||||
#include "components/safe_browsing/buildflags.h"
|
|
||||||
#include "components/security_interstitials/core/features.h"
|
|
||||||
#include "components/security_interstitials/core/pref_names.h"
|
|
||||||
+#endif
|
|
||||||
+#include "components/prefs/pref_service.h"
|
|
||||||
#include "components/security_state/content/content_utils.h"
|
|
||||||
#include "content/public/browser/browser_context.h"
|
|
||||||
#include "content/public/browser/navigation_entry.h"
|
|
||||||
@@ -54,7 +59,7 @@
|
|
||||||
#include "chrome/browser/chromeos/policy/policy_cert_service_factory.h"
|
|
||||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
|
||||||
|
|
||||||
-#if BUILDFLAG(FULL_SAFE_BROWSING)
|
|
||||||
+#if 0
|
|
||||||
#include "chrome/browser/safe_browsing/chrome_password_protection_service.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@@ -76,8 +81,9 @@ void RecordSecurityLevel(
|
|
||||||
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
+#if 0
|
|
||||||
using password_manager::metrics_util::PasswordType;
|
|
||||||
-using safe_browsing::SafeBrowsingUIManager;
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
SecurityStateTabHelper::SecurityStateTabHelper(
|
|
||||||
content::WebContents* web_contents)
|
|
||||||
@@ -101,6 +107,7 @@ SecurityStateTabHelper::GetVisibleSecurityState() {
|
|
||||||
// information is still being initialized, thus no need to check for that.
|
|
||||||
state->malicious_content_status = GetMaliciousContentStatus();
|
|
||||||
|
|
||||||
+#if 0
|
|
||||||
ReputationWebContentsObserver* reputation_web_contents_observer =
|
|
||||||
ReputationWebContentsObserver::FromWebContents(web_contents());
|
|
||||||
state->safety_tip_info =
|
|
||||||
@@ -125,6 +132,7 @@ SecurityStateTabHelper::GetVisibleSecurityState() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+#endif
|
|
||||||
return state;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -184,8 +192,10 @@ void SecurityStateTabHelper::DidFinishNavigation(
|
|
||||||
UMA_HISTOGRAM_BOOLEAN("interstitial.ssl.visited_site_after_warning", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if 0
|
|
||||||
MaybeShowKnownInterceptionDisclosureDialog(
|
|
||||||
web_contents(), visible_security_state->cert_status);
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void SecurityStateTabHelper::DidChangeVisibleSecurityState() {
|
|
||||||
@@ -209,6 +219,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)
|
|
||||||
@@ -287,6 +298,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+#endif
|
|
||||||
return security_state::MALICIOUS_CONTENT_STATUS_NONE;
|
|
||||||
}
|
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
#include "base/threading/thread_task_runner_handle.h"
|
#include "base/threading/thread_task_runner_handle.h"
|
||||||
#include "base/values.h"
|
#include "base/values.h"
|
||||||
#include "chrome/browser/browser_process.h"
|
#include "chrome/browser/browser_process.h"
|
||||||
#include "chrome/browser/ssl/security_state_tab_helper.h"
|
|
||||||
#include "chrome/browser/ui/views/eye_dropper/eye_dropper.h"
|
#include "chrome/browser/ui/views/eye_dropper/eye_dropper.h"
|
||||||
#include "chrome/common/pref_names.h"
|
#include "chrome/common/pref_names.h"
|
||||||
#include "components/prefs/pref_service.h"
|
#include "components/prefs/pref_service.h"
|
||||||
|
@ -833,7 +832,6 @@ void WebContents::InitWithSessionAndOptions(
|
||||||
web_contents()->NotifyPreferencesChanged();
|
web_contents()->NotifyPreferencesChanged();
|
||||||
|
|
||||||
WebContentsPermissionHelper::CreateForWebContents(web_contents());
|
WebContentsPermissionHelper::CreateForWebContents(web_contents());
|
||||||
SecurityStateTabHelper::CreateForWebContents(web_contents());
|
|
||||||
InitZoomController(web_contents(), options);
|
InitZoomController(web_contents(), options);
|
||||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||||
extensions::ElectronExtensionWebContentsObserver::CreateForWebContents(
|
extensions::ElectronExtensionWebContentsObserver::CreateForWebContents(
|
||||||
|
@ -877,7 +875,6 @@ void WebContents::InitWithExtensionView(v8::Isolate* isolate,
|
||||||
Observe(web_contents);
|
Observe(web_contents);
|
||||||
InitWithWebContents(web_contents, GetBrowserContext(), IsGuest());
|
InitWithWebContents(web_contents, GetBrowserContext(), IsGuest());
|
||||||
inspectable_web_contents_->GetView()->SetDelegate(this);
|
inspectable_web_contents_->GetView()->SetDelegate(this);
|
||||||
SecurityStateTabHelper::CreateForWebContents(web_contents);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -3237,11 +3234,9 @@ bool WebContents::IsFullscreenForTabOrPending(
|
||||||
blink::SecurityStyle WebContents::GetSecurityStyle(
|
blink::SecurityStyle WebContents::GetSecurityStyle(
|
||||||
content::WebContents* web_contents,
|
content::WebContents* web_contents,
|
||||||
content::SecurityStyleExplanations* security_style_explanations) {
|
content::SecurityStyleExplanations* security_style_explanations) {
|
||||||
SecurityStateTabHelper* helper =
|
auto state = security_state::GetVisibleSecurityState(web_contents);
|
||||||
SecurityStateTabHelper::FromWebContents(web_contents);
|
auto security_level = security_state::GetSecurityLevel(*state, false);
|
||||||
DCHECK(helper);
|
return security_state::GetSecurityStyle(security_level, *state,
|
||||||
return security_state::GetSecurityStyle(helper->GetSecurityLevel(),
|
|
||||||
*helper->GetVisibleSecurityState(),
|
|
||||||
security_style_explanations);
|
security_style_explanations);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue