Update chromium patches

This commit is contained in:
Nitish Sakhawalkar 2019-05-13 11:49:01 -07:00
parent f14eb32758
commit e794260d89
52 changed files with 268 additions and 341 deletions

View file

@ -6,10 +6,10 @@ 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 aef4333e3d769d26b71822294d5f2fcedf3141c5..fe3d44e33213daa89f6ea5f4f84103686db6aece 100644
index 6ef33c5357cf08c1f17e9f20bd8d659bf4807d1c..a7062ccbb1c11c092e114fe498370f500c44c96b 100644
--- a/chrome/browser/ssl/security_state_tab_helper.cc
+++ b/chrome/browser/ssl/security_state_tab_helper.cc
@@ -12,10 +12,12 @@
@@ -13,10 +13,12 @@
#include "base/strings/pattern.h"
#include "base/strings/string_util.h"
#include "build/build_config.h"
@ -19,10 +19,10 @@ index aef4333e3d769d26b71822294d5f2fcedf3141c5..fe3d44e33213daa89f6ea5f4f8410368
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/browser/safe_browsing/ui_manager.h"
+#endif
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/secure_origin_whitelist.h"
@@ -45,8 +47,10 @@
#include "components/omnibox/browser/omnibox_field_trial.h"
#include "components/omnibox/common/omnibox_features.h"
@@ -42,8 +44,10 @@
#endif // defined(OS_CHROMEOS)
#if defined(FULL_SAFE_BROWSING)
@ -33,7 +33,7 @@ index aef4333e3d769d26b71822294d5f2fcedf3141c5..fe3d44e33213daa89f6ea5f4f8410368
namespace {
@@ -82,7 +86,9 @@ bool IsOriginSecureWithWhitelist(
@@ -63,7 +67,9 @@ void RecordSecurityLevel(
} // namespace
@ -43,7 +43,7 @@ index aef4333e3d769d26b71822294d5f2fcedf3141c5..fe3d44e33213daa89f6ea5f4f8410368
SecurityStateTabHelper::SecurityStateTabHelper(
content::WebContents* web_contents)
@@ -149,6 +155,7 @@ void SecurityStateTabHelper::DidFinishNavigation(
@@ -129,6 +135,7 @@ void SecurityStateTabHelper::DidFinishNavigation(
UMA_HISTOGRAM_BOOLEAN("interstitial.ssl.visited_site_after_warning", true);
}
@ -51,7 +51,7 @@ index aef4333e3d769d26b71822294d5f2fcedf3141c5..fe3d44e33213daa89f6ea5f4f8410368
// 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.
@@ -176,6 +183,7 @@ void SecurityStateTabHelper::DidFinishNavigation(
@@ -156,6 +163,7 @@ void SecurityStateTabHelper::DidFinishNavigation(
"Validation is still valid.");
}
}
@ -59,7 +59,7 @@ index aef4333e3d769d26b71822294d5f2fcedf3141c5..fe3d44e33213daa89f6ea5f4f8410368
}
void SecurityStateTabHelper::DidChangeVisibleSecurityState() {
@@ -199,6 +207,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
@@ -179,6 +187,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
web_contents()->GetController().GetVisibleEntry();
if (!entry)
return security_state::MALICIOUS_CONTENT_STATUS_NONE;
@ -67,7 +67,7 @@ index aef4333e3d769d26b71822294d5f2fcedf3141c5..fe3d44e33213daa89f6ea5f4f8410368
safe_browsing::SafeBrowsingService* sb_service =
g_browser_process->safe_browsing_service();
if (!sb_service)
@@ -266,6 +275,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
@@ -246,6 +255,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
break;
}
}
@ -75,24 +75,3 @@ index aef4333e3d769d26b71822294d5f2fcedf3141c5..fe3d44e33213daa89f6ea5f4f8410368
return security_state::MALICIOUS_CONTENT_STATUS_NONE;
}
@@ -273,16 +283,20 @@ std::vector<std::string> SecurityStateTabHelper::GetSecureOriginsAndPatterns()
const {
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
+#if 0
Profile* profile =
Profile::FromBrowserContext(web_contents()->GetBrowserContext());
PrefService* prefs = profile->GetPrefs();
+#endif
std::string origins_str = "";
if (command_line.HasSwitch(
network::switches::kUnsafelyTreatInsecureOriginAsSecure)) {
origins_str = command_line.GetSwitchValueASCII(
network::switches::kUnsafelyTreatInsecureOriginAsSecure);
+#if 0
} else if (prefs->HasPrefPath(prefs::kUnsafelyTreatInsecureOriginAsSecure)) {
origins_str = prefs->GetString(prefs::kUnsafelyTreatInsecureOriginAsSecure);
+#endif
}
return network::ParseSecureOriginAllowlist(origins_str);
}