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

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 Lei Zhang's comments Created 4 years, 3 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
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/plugins/flash_download_interception.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1e98c971f84eccd44dea1102742d98f9d6fe3713..1668214862ddf25f1155247e66820a90907fc561 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -302,6 +302,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)
@@ -3003,7 +3004,15 @@ ScopedVector<content::NavigationThrottle>
ChromeContentBrowserClient::CreateThrottlesForNavigation(
content::NavigationHandle* handle) {
ScopedVector<content::NavigationThrottle> throttles;
+
if (handle->IsInMainFrame()) {
+#if defined(ENABLE_PLUGINS)
+ std::unique_ptr<content::NavigationThrottle> flash_url_throttle =
+ FlashDownloadInterception::MaybeCreateThrottleFor(handle);
+ if (flash_url_throttle)
+ throttles.push_back(std::move(flash_url_throttle));
+#endif
+
throttles.push_back(
page_load_metrics::MetricsNavigationThrottle::Create(handle));
}
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/plugins/flash_download_interception.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698