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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java

Issue 2413683003: Fix a bug where we were forcing pdf intents to stay in Chrome. (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java
index 60c862d45264007d6e1cdfe7bb8b8344b9da82c5..ecb8465aa3c118cf2a401d5a44f4daf8d794a889 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java
@@ -159,11 +159,6 @@ public class ExternalNavigationHandler {
return OverrideUrlLoadingResult.NO_OVERRIDE;
}
- // http://crbug.com/605302 : Allow Chrome to handle all pdf file downloads.
- if (mDelegate.isPdfDownload(params.getUrl())) {
- return OverrideUrlLoadingResult.NO_OVERRIDE;
- }
-
// pageTransition is a combination of an enumeration (core value) and bitmask.
int pageTransitionCore = params.getPageTransition() & PageTransition.CORE_MASK;
boolean isLink = pageTransitionCore == PageTransition.LINK;
@@ -194,6 +189,11 @@ public class ExternalNavigationHandler {
return OverrideUrlLoadingResult.NO_OVERRIDE;
}
+ // http://crbug.com/605302 : Allow Chrome to handle all pdf file downloads.
+ if (!isExternalProtocol && mDelegate.isPdfDownload(params.getUrl())) {
+ return OverrideUrlLoadingResult.NO_OVERRIDE;
+ }
+
// If accessing a file URL, ensure that the user has granted the necessary file access
// to Chrome. This check should happen for reloads, navigations, etc..., which is why
// it occurs before the subsequent blocks.
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698