update chromium patches
This commit is contained in:
parent
0f990c3bdd
commit
2dc422234a
32 changed files with 119 additions and 258 deletions
|
@ -6,7 +6,7 @@ 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 4c1b8bda5a8dbd52d0047e8945490d25c21a3164..2fcc2f9a2b233223b99d67df0f2ecaf02b464ae7 100644
|
||||
index 1ca339cf487763237d45b7ce2cead2459ecd7e93..754821b54f7c8e6b1653e201ca36bd26db842329 100644
|
||||
--- a/chrome/browser/ssl/security_state_tab_helper.cc
|
||||
+++ b/chrome/browser/ssl/security_state_tab_helper.cc
|
||||
@@ -12,10 +12,12 @@
|
||||
|
@ -22,16 +22,18 @@ index 4c1b8bda5a8dbd52d0047e8945490d25c21a3164..2fcc2f9a2b233223b99d67df0f2ecaf0
|
|||
#include "chrome/common/chrome_switches.h"
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "chrome/common/secure_origin_whitelist.h"
|
||||
@@ -42,7 +44,7 @@
|
||||
#include "chrome/browser/chromeos/policy/policy_cert_service_factory.h"
|
||||
@@ -45,8 +47,10 @@
|
||||
#endif // defined(OS_CHROMEOS)
|
||||
|
||||
-#if defined(SAFE_BROWSING_DB_LOCAL)
|
||||
#if defined(FULL_SAFE_BROWSING)
|
||||
+#if 0
|
||||
#include "chrome/browser/safe_browsing/chrome_password_protection_service.h"
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
@@ -78,7 +80,9 @@ bool IsOriginSecureWithWhitelist(
|
||||
namespace {
|
||||
|
||||
@@ -82,7 +86,9 @@ bool IsOriginSecureWithWhitelist(
|
||||
|
||||
} // namespace
|
||||
|
||||
|
@ -41,7 +43,7 @@ index 4c1b8bda5a8dbd52d0047e8945490d25c21a3164..2fcc2f9a2b233223b99d67df0f2ecaf0
|
|||
|
||||
SecurityStateTabHelper::SecurityStateTabHelper(
|
||||
content::WebContents* web_contents)
|
||||
@@ -138,6 +142,7 @@ void SecurityStateTabHelper::DidFinishNavigation(
|
||||
@@ -161,6 +167,7 @@ void SecurityStateTabHelper::DidFinishNavigation(
|
||||
UMA_HISTOGRAM_BOOLEAN("interstitial.ssl.visited_site_after_warning", true);
|
||||
}
|
||||
|
||||
|
@ -49,7 +51,7 @@ index 4c1b8bda5a8dbd52d0047e8945490d25c21a3164..2fcc2f9a2b233223b99d67df0f2ecaf0
|
|||
// 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.
|
||||
@@ -165,6 +170,7 @@ void SecurityStateTabHelper::DidFinishNavigation(
|
||||
@@ -188,6 +195,7 @@ void SecurityStateTabHelper::DidFinishNavigation(
|
||||
"Validation is still valid.");
|
||||
}
|
||||
}
|
||||
|
@ -57,7 +59,7 @@ index 4c1b8bda5a8dbd52d0047e8945490d25c21a3164..2fcc2f9a2b233223b99d67df0f2ecaf0
|
|||
}
|
||||
|
||||
void SecurityStateTabHelper::DidChangeVisibleSecurityState() {
|
||||
@@ -190,6 +196,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
|
||||
@@ -211,6 +219,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
|
||||
web_contents()->GetController().GetVisibleEntry();
|
||||
if (!entry)
|
||||
return security_state::MALICIOUS_CONTENT_STATUS_NONE;
|
||||
|
@ -65,7 +67,7 @@ index 4c1b8bda5a8dbd52d0047e8945490d25c21a3164..2fcc2f9a2b233223b99d67df0f2ecaf0
|
|||
safe_browsing::SafeBrowsingService* sb_service =
|
||||
g_browser_process->safe_browsing_service();
|
||||
if (!sb_service)
|
||||
@@ -257,6 +264,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
|
||||
@@ -278,6 +287,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -73,7 +75,7 @@ index 4c1b8bda5a8dbd52d0047e8945490d25c21a3164..2fcc2f9a2b233223b99d67df0f2ecaf0
|
|||
return security_state::MALICIOUS_CONTENT_STATUS_NONE;
|
||||
}
|
||||
|
||||
@@ -275,15 +283,19 @@ std::vector<std::string> SecurityStateTabHelper::GetSecureOriginsAndPatterns()
|
||||
@@ -285,16 +295,20 @@ std::vector<std::string> SecurityStateTabHelper::GetSecureOriginsAndPatterns()
|
||||
const {
|
||||
const base::CommandLine& command_line =
|
||||
*base::CommandLine::ForCurrentProcess();
|
||||
|
@ -83,37 +85,14 @@ index 4c1b8bda5a8dbd52d0047e8945490d25c21a3164..2fcc2f9a2b233223b99d67df0f2ecaf0
|
|||
PrefService* prefs = profile->GetPrefs();
|
||||
+#endif
|
||||
std::string origins_str = "";
|
||||
if (command_line.HasSwitch(switches::kUnsafelyTreatInsecureOriginAsSecure)) {
|
||||
if (command_line.HasSwitch(
|
||||
network::switches::kUnsafelyTreatInsecureOriginAsSecure)) {
|
||||
origins_str = command_line.GetSwitchValueASCII(
|
||||
switches::kUnsafelyTreatInsecureOriginAsSecure);
|
||||
network::switches::kUnsafelyTreatInsecureOriginAsSecure);
|
||||
+#if 0
|
||||
} else if (prefs->HasPrefPath(prefs::kUnsafelyTreatInsecureOriginAsSecure)) {
|
||||
origins_str = prefs->GetString(prefs::kUnsafelyTreatInsecureOriginAsSecure);
|
||||
+#endif
|
||||
}
|
||||
return secure_origin_whitelist::ParseWhitelist(origins_str);
|
||||
return network::ParseSecureOriginAllowlist(origins_str);
|
||||
}
|
||||
diff --git a/chrome/common/secure_origin_whitelist.cc b/chrome/common/secure_origin_whitelist.cc
|
||||
index b70d6ced887d2a2ecb576b20d79e7fc4272e2054..5a75fe115c3c77f4a9edf7913b47341a757d1b42 100644
|
||||
--- a/chrome/common/secure_origin_whitelist.cc
|
||||
+++ b/chrome/common/secure_origin_whitelist.cc
|
||||
@@ -13,7 +13,9 @@
|
||||
#include "chrome/common/chrome_switches.h"
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "components/prefs/pref_registry_simple.h"
|
||||
+#if 0
|
||||
#include "extensions/common/constants.h"
|
||||
+#endif
|
||||
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
|
||||
#include "url/gurl.h"
|
||||
#include "url/origin.h"
|
||||
@@ -163,7 +165,9 @@ std::vector<std::string> GetWhitelist() {
|
||||
|
||||
std::set<std::string> GetSchemesBypassingSecureContextCheck() {
|
||||
std::set<std::string> schemes;
|
||||
+#if 0
|
||||
schemes.insert(extensions::kExtensionScheme);
|
||||
+#endif
|
||||
return schemes;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue