New issue
Advanced search Search tips

Issue 704701 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Jun 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

PDF shows as text when opened from Play Store app

Reported by twotwo...@gmail.com, Mar 23 2017

Issue description

UserAgent: Mozilla/5.0 (X11; CrOS aarch64 9000.91.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.110 Safari/537.36
Platform: 9000.91.0 (Official Build) stable-channel kevin

Example URL:
externalfile:arc-content/content...

Steps to reproduce the problem:
1. Open, for example, the GMail app from Play Store
2. Choose to open an attached PDF
3. Choose "Chrome" from the list of viewers

What is the expected behavior?
The PDF opens in Chrome's internal PDF viewer

What went wrong?
The PDF content is shown as plain text.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 56.0.2924.110  Channel: n/a
OS Version: 9000.91.0
Flash Version: Shockwave Flash 24.0 r0

The externalfile:arc-content/content... URL shows up with no MIME type in devtools, and I guess Chrome doesn't sniff out that it's a PDF.
 

Comment 1 by tkent@chromium.org, Mar 24 2017

Components: -Blink Platform>ARC

Comment 2 by uekawa@google.com, Mar 24 2017

Cc: nya@chromium.org hashimoto@chromium.org
Owner: hashimoto@chromium.org
Status: Assigned (was: Unconfirmed)

Comment 4 by uekawa@chromium.org, May 16 2017

b/37970835 was filed internally.

Comment 5 by uekawa@google.com, May 22 2017

Labels: -Pri-2 M-61 Pri-1
Project Member

Comment 6 by bugdroid1@chromium.org, Jun 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/aa692120241e0bfd072ac7b1b34ff26fcc6aa838

commit aa692120241e0bfd072ac7b1b34ff26fcc6aa838
Author: hashimoto <hashimoto@chromium.org>
Date: Mon Jun 05 06:35:06 2017

arc: Use the MIME type returned by the container to handle content URLs

Currently, when displaying an ARC file specified by a content URL, we are using MIME type guessed by looking at the extension part of the URL.
This doesn't always work so we should ask the ContentResolver running in the container to get the actual MIME type.

- Add GetMimeType to FileSystemInstance interface.
- Add arc::PathToArcUrl to arc_content_file_system_url_util
- Use GetMimeType and arc::PathToArcUrl in filesystem_api_util.cc

BUG= 704701 
TEST=Download a image file to the device's Downloads directory. Open chrome://settings/androidApps/details -> "Manage Android
preferences" -> Storage -> Images -> Download -> <the downloaded image file>.
Verify that the image file is displayed correctly, not as garbage text.

Review-Url: https://codereview.chromium.org/2914433002
Cr-Commit-Position: refs/heads/master@{#476953}

[modify] https://crrev.com/aa692120241e0bfd072ac7b1b34ff26fcc6aa838/chrome/browser/chromeos/arc/fileapi/arc_content_file_system_async_file_util_unittest.cc
[modify] https://crrev.com/aa692120241e0bfd072ac7b1b34ff26fcc6aa838/chrome/browser/chromeos/arc/fileapi/arc_content_file_system_file_stream_reader_unittest.cc
[modify] https://crrev.com/aa692120241e0bfd072ac7b1b34ff26fcc6aa838/chrome/browser/chromeos/arc/fileapi/arc_content_file_system_url_util.cc
[modify] https://crrev.com/aa692120241e0bfd072ac7b1b34ff26fcc6aa838/chrome/browser/chromeos/arc/fileapi/arc_content_file_system_url_util.h
[modify] https://crrev.com/aa692120241e0bfd072ac7b1b34ff26fcc6aa838/chrome/browser/chromeos/arc/fileapi/arc_content_file_system_url_util_unittest.cc
[modify] https://crrev.com/aa692120241e0bfd072ac7b1b34ff26fcc6aa838/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner.cc
[modify] https://crrev.com/aa692120241e0bfd072ac7b1b34ff26fcc6aa838/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner.h
[modify] https://crrev.com/aa692120241e0bfd072ac7b1b34ff26fcc6aa838/chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner_unittest.cc
[modify] https://crrev.com/aa692120241e0bfd072ac7b1b34ff26fcc6aa838/chrome/browser/chromeos/file_manager/filesystem_api_util.cc
[modify] https://crrev.com/aa692120241e0bfd072ac7b1b34ff26fcc6aa838/components/arc/common/file_system.mojom
[modify] https://crrev.com/aa692120241e0bfd072ac7b1b34ff26fcc6aa838/components/arc/test/fake_file_system_instance.cc
[modify] https://crrev.com/aa692120241e0bfd072ac7b1b34ff26fcc6aa838/components/arc/test/fake_file_system_instance.h

Status: Fixed (was: Assigned)
Status: Verified (was: Fixed)
9649.0.0, 61.0.3129.0

Sign in to add a comment