| Index: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
|
| index 199e49d24ed01201cae11219fdc0971d59360327..f0f21ae98cdb15a2471b9338f27ca5185b1a84a0 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
|
| @@ -992,9 +992,23 @@ public class CustomTabActivity extends ChromeActivity {
|
| */
|
| private String getUrlToLoad() {
|
| String url = IntentHandler.getUrlFromIntent(getIntent());
|
| +
|
| + // Intents fired for media viewers have an additional file:// URI passed along so that the
|
| + // tab can display the actual filename to the user when it is loaded.
|
| + if (mIntentDataProvider.isMediaViewer()) {
|
| + String mediaViewerUrl = mIntentDataProvider.getMediaViewerUrl();
|
| + if (!TextUtils.isEmpty(mediaViewerUrl)) {
|
| + Uri mediaViewerUri = Uri.parse(mediaViewerUrl);
|
| + if ("file".equals(mediaViewerUri.getScheme())) {
|
| + url = mediaViewerUrl;
|
| + }
|
| + }
|
| + }
|
| +
|
| if (!TextUtils.isEmpty(url)) {
|
| url = DataReductionProxySettings.getInstance().maybeRewriteWebliteUrl(url);
|
| }
|
| +
|
| return url;
|
| }
|
|
|
|
|