don't upgrade to https before exceptions list is loaded (#17111)

This commit is contained in:
Arthur Edelstein
2023-02-08 20:24:32 -08:00
committed by GitHub
parent eefbd386b5
commit fdf93a5f3f
@@ -45,6 +45,10 @@ void HttpsUpgradeExceptionsService::LoadHTTPSUpgradeExceptions(
void HttpsUpgradeExceptionsService::OnDATFileDataReady(
const std::string& contents) {
if (contents.empty()) {
// We don't have the file yet.
return;
}
std::vector<std::string> lines = base::SplitString(
contents, "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
for (const auto& line : lines) {