Apply xsmile's suggestions

This commit is contained in:
Albert Tang
2019-10-24 14:05:07 -05:00
parent 62254d689c
commit 7a6138993d
3 changed files with 8 additions and 14 deletions
@@ -225,26 +225,20 @@
} else if (path_without_query == "/clock") {
interstitial_delegate.reset(CreateBadClockBlockingPage(web_contents));
} else if (path_without_query == "/lookalike") {
@@ -502,16 +389,12 @@ void InterstitialHTMLSource::StartDataRe
@@ -500,13 +387,6 @@ void InterstitialHTMLSource::StartDataRe
} else if (path_without_query == "/origin_policy") {
interstitial_delegate.reset(
CreateOriginPolicyInterstitialPage(web_contents));
}
- }
-
- if (path_without_query == "/quietsafebrowsing") {
- TestSafeBrowsingBlockingPageQuiet* blocking_page =
- CreateSafeBrowsingQuietBlockingPage(web_contents);
- interstitial_delegate.reset(blocking_page);
- html = blocking_page->GetHTML();
#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
- } else if (path_without_query == "/supervised_user") {
+ if (path_without_query == "/supervised_user") {
} else if (path_without_query == "/supervised_user") {
html = GetSupervisedUserInterstitialHTML(path);
+ }
#endif
- } else if (interstitial_delegate.get()) {
+ if (interstitial_delegate.get()) {
html = interstitial_delegate.get()->GetHTMLContents();
} else {
html = ui::ResourceBundle::GetSharedInstance().DecompressDataResource(
--- a/chrome/browser/extensions/blacklist_state_fetcher.cc
+++ b/chrome/browser/extensions/blacklist_state_fetcher.cc
@@ -32,28 +32,8 @@ BlacklistStateFetcher::~BlacklistStateFe
@@ -259,7 +259,7 @@
new net::URLRequestJobFactoryImpl());
// Keep ProtocolHandlers added in sync with
// CastContentBrowserClient::IsHandledURL().
+ bool set_protocol = false
+ bool set_protocol = false;
for (content::ProtocolHandlerMap::iterator it = protocol_handlers->begin();
it != protocol_handlers->end();
++it) {
@@ -114,7 +114,7 @@
- return DownloadConfirmationReason::NONE;
+ if (!download_crx_util::ShouldDownloadAsRegularFile()) {
+ // Don't prompt for extension downloads.
+ if (download_crx_util::IsExtensionDownload(*download_) ||
+ if (download_crx_util::IsTrustedExtensionDownload(GetProfile(), *download_) ||
+ filename.MatchesExtension(extensions::kExtensionFileExtension))
+ return DownloadConfirmationReason::NONE;
+ }