8383c14aba
* chore: bump chromium in DEPS to 91c9f44297abe2844f593ec7956e6ce79c81f463 * chore: update chromium patches * chore: update v8 patches * build: service_names.mojom has been deleted Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2568681 * chore: add DISPLAY_CAPTURE permission to converter Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2551098 * chore: handle AXPropertyFilter::SCRIPT in accessibility_ui Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2563923 * refactor: web_isolated_world_ids.h has been deleted Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2585255 * refactor: ResourceType has been deprecated / removed in ExtensionsBrowserClient Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2562002 * chore: fix lint * chore: remove deleted headers * build: disable gn check for blink header * fix: refactor X11 event handling Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2577887 Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2585750 * chore: update patches * chore: bump chromium in DEPS to bfd8e7dbd37af8b1bc40d887815edd5a29496fa3 * chore: update patches * refactor: xeventobserver is now x11:eventobserver Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2585750 * refactor: remove UseWebUIBindingsForURL Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2583590 * chore: DidProcessXEvent has been removed * chore: bump chromium in DEPS to b13e791d7244a08d9d61dbfa2bb2b6cdf1ff6294 * chore: update patches * build: change gfx::GetAtom to x11:GetAtom Refs:d972a0ae4a
* build: change gfx namespace to x11 Ref:d972a0ae4a
* build: change ui namespace to x11 Refs:c38f8571a8
:ui/gfx/x/xproto_util.h;dlc=ba9145d0c7f2b10e869e2ba482ca05b75ca35812 * chore: add patch to fix blink prefs fetching during frame swap * chore: fix lint * fix: do not make invalid SKImageRep in FrameSubscriber Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2572896 Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
129 lines
4.9 KiB
Diff
129 lines
4.9 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 c11f6e1ccb92aebad9bc3c50b7cecf9306ae815a..c89ddc95ffe595ec310f316b796eeea88f5f4e2c 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,25 +15,29 @@
|
|
#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/browser/ssl/tls_deprecation_config.h"
|
|
#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"
|
|
@@ -55,7 +60,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
|
|
|
|
@@ -99,9 +104,12 @@ bool IsLegacyTLS(GURL url, int connection_status) {
|
|
// default we treat TLS < 1.2 as Legacy, unless the "SSLVersionMin" policy is
|
|
// set.
|
|
std::string ssl_version_min_str = switches::kSSLVersionTLSv12;
|
|
- PrefService* local_state = g_browser_process->local_state();
|
|
- if (local_state && local_state->HasPrefPath(prefs::kSSLVersionMin)) {
|
|
- ssl_version_min_str = local_state->GetString(prefs::kSSLVersionMin);
|
|
+
|
|
+ // Read directly from the command line, since our pref store is not the same
|
|
+ // as Chrome's.
|
|
+ auto* cmd_line = base::CommandLine::ForCurrentProcess();
|
|
+ if (cmd_line->HasSwitch(::switches::kSSLVersionMin)) {
|
|
+ ssl_version_min_str = cmd_line->GetSwitchValueASCII(::switches::kSSLVersionMin);
|
|
}
|
|
|
|
// Convert the pref string to an SSLVersion, if it is valid. Otherwise use the
|
|
@@ -121,8 +129,9 @@ bool IsLegacyTLS(GURL url, int connection_status) {
|
|
|
|
} // namespace
|
|
|
|
+#if 0
|
|
using password_manager::metrics_util::PasswordType;
|
|
-using safe_browsing::SafeBrowsingUIManager;
|
|
+#endif
|
|
|
|
SecurityStateTabHelper::SecurityStateTabHelper(
|
|
content::WebContents* web_contents)
|
|
@@ -168,6 +177,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 =
|
|
@@ -192,6 +202,7 @@ SecurityStateTabHelper::GetVisibleSecurityState() {
|
|
}
|
|
}
|
|
|
|
+#endif
|
|
return state;
|
|
}
|
|
|
|
@@ -254,8 +265,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() {
|
|
@@ -279,6 +292,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)
|
|
@@ -361,6 +375,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
|
|
break;
|
|
}
|
|
}
|
|
+#endif
|
|
return security_state::MALICIOUS_CONTENT_STATUS_NONE;
|
|
}
|
|
|