Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(485)

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2272123002: [HBD] Intercept navigation to Flash download page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes per tommycli@'s comments Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 49f9dff09fcfc916180f8743e78d5de5c031740f..ca609c273830f9efd52a33873dff4050d4cbe8aa 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -300,6 +300,7 @@
#if defined(ENABLE_PLUGINS)
#include "chrome/browser/plugins/chrome_content_browser_client_plugins_part.h"
+#include "chrome/browser/plugins/flash_download_interception.h"
#endif
#if defined(ENABLE_SPELLCHECK)
@@ -3014,6 +3015,16 @@ ScopedVector<content::NavigationThrottle>
ChromeContentBrowserClient::CreateThrottlesForNavigation(
content::NavigationHandle* handle) {
ScopedVector<content::NavigationThrottle> throttles;
+
+#if defined(ENABLE_PLUGINS)
Lei Zhang 2016/08/25 00:55:06 Merge into the if block below? if (handle->IsInMa
trizzofo 2016/08/25 01:50:36 Done.
+ if (handle->IsInMainFrame()) {
+ std::unique_ptr<content::NavigationThrottle> flash_url_throttle =
+ FlashDownloadInterception::MaybeCreateThrottleFor(handle);
+ if (flash_url_throttle)
+ throttles.push_back(std::move(flash_url_throttle));
+ }
+#endif
+
if (handle->IsInMainFrame()) {
throttles.push_back(
page_load_metrics::MetricsNavigationThrottle::Create(handle));

Powered by Google App Engine
This is Rietveld 408576698