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

Issue 665163005: Add option to open PDFs in system viewer to OS X and Linux. (Closed)

Created:
6 years, 2 months ago by palmer
Modified:
6 years, 1 month ago
CC:
chromium-reviews, benjhayden+dwatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Add option to open PDFs in system viewer to OS X and Linux. Not just Windows. BUG=370746 TEST=With a fresh profile, download a PDF. In the Download Shelf, select Always Open With System Viewer. Check that subsequent downloads of PDFs launch the system PDF viewer. (On Corp Macs, that is defined to be Chrome; change it to Preview.app.) Committed: https://crrev.com/bfe0fce99e0da81fd9f07bd4cc4e6587cc342046 Cr-Commit-Position: refs/heads/master@{#303298}

Patch Set 1 #

Patch Set 2 : Harmonize the strings a bit better. #

Total comments: 2

Patch Set 3 : Unify the various identifiers for less #ifdefing. #

Total comments: 4

Patch Set 4 : CanOpenPdfInReader --> CanOpenPdfInSystemViewer #

Patch Set 5 : Only check status of Adobe Reader if Adobe Reader is the system viewer. #

Total comments: 2

Patch Set 6 : Check that Adobe Reader is the default viewer in another place. Small bit of cleanup. #

Patch Set 7 : Rebase and add a TEST to the description. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -54 lines) Patch
M chrome/app/generated_resources.grd View 3 chunks +9 lines, -1 line 0 comments Download
M chrome/browser/download/chrome_download_manager_delegate.cc View 1 2 3 4 5 6 1 chunk +4 lines, -5 lines 0 comments Download
M chrome/browser/download/download_prefs.h View 1 2 2 chunks +9 lines, -6 lines 0 comments Download
M chrome/browser/download/download_prefs.cc View 1 2 3 4 5 5 chunks +30 lines, -20 lines 0 comments Download
M chrome/browser/download/download_shelf_context_menu.h View 1 2 3 4 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/download/download_shelf_context_menu.cc View 1 2 3 4 5 4 chunks +24 lines, -13 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 18 (2 generated)
palmer
asanka and rdsmith: OWNERS for chrome/browser/download/OWNERS. thestig: To make sure you agree this matches your ...
6 years, 2 months ago (2014-10-21 00:38:41 UTC) #2
Lei Zhang
Looks like this matches my intent on Windows. https://codereview.chromium.org/665163005/diff/20001/chrome/browser/download/chrome_download_manager_delegate.cc File chrome/browser/download/chrome_download_manager_delegate.cc (right): https://codereview.chromium.org/665163005/diff/20001/chrome/browser/download/chrome_download_manager_delegate.cc#newcode722 chrome/browser/download/chrome_download_manager_delegate.cc:722: #if ...
6 years, 2 months ago (2014-10-21 11:07:06 UTC) #3
Randy Smith (Not in Mondays)
Do we need to make this system specific? I'm slightly allergic to platform ifdefs, and ...
6 years, 2 months ago (2014-10-21 15:02:07 UTC) #4
asanka
On 2014/10/21 15:02:07, rdsmith wrote: > Do we need to make this system specific? I'm ...
6 years, 2 months ago (2014-10-21 16:18:43 UTC) #5
palmer
Yes, that all sounds good and I'll work on it now.
6 years, 2 months ago (2014-10-21 19:23:31 UTC) #6
palmer
https://codereview.chromium.org/665163005/diff/20001/chrome/browser/download/chrome_download_manager_delegate.cc File chrome/browser/download/chrome_download_manager_delegate.cc (right): https://codereview.chromium.org/665163005/diff/20001/chrome/browser/download/chrome_download_manager_delegate.cc#newcode722 chrome/browser/download/chrome_download_manager_delegate.cc:722: #if defined(OS_MACOSX) || defined(OS_LINUX) On 2014/10/21 11:07:06, Lei Zhang ...
6 years, 2 months ago (2014-10-21 20:31:49 UTC) #7
palmer
OK, see what you think now. There's less #ifdef'ing. Thanks!
6 years, 2 months ago (2014-10-21 20:52:50 UTC) #8
asanka
This seems to not handle non-'Adobe Reader' PDF viewers on Windows. Is that intentional? https://codereview.chromium.org/665163005/diff/40001/chrome/browser/download/download_shelf_context_menu.cc ...
6 years, 2 months ago (2014-10-23 07:38:04 UTC) #9
palmer
https://codereview.chromium.org/665163005/diff/40001/chrome/browser/download/download_shelf_context_menu.cc File chrome/browser/download/download_shelf_context_menu.cc (right): https://codereview.chromium.org/665163005/diff/40001/chrome/browser/download/download_shelf_context_menu.cc#newcode408 chrome/browser/download/download_shelf_context_menu.cc:408: bool DownloadShelfContextMenu::CanOpenPdfInReader() const { > CanOpenPdfInSystemViewer? OK, changed the ...
6 years, 2 months ago (2014-10-23 22:17:08 UTC) #10
palmer
> This seems to not handle non-'Adobe Reader' PDF viewers on Windows. Is that > ...
6 years, 2 months ago (2014-10-23 22:37:53 UTC) #11
asanka
https://codereview.chromium.org/665163005/diff/80001/chrome/browser/download/download_prefs.cc File chrome/browser/download/download_prefs.cc (right): https://codereview.chromium.org/665163005/diff/80001/chrome/browser/download/download_prefs.cc#newcode348 chrome/browser/download/download_prefs.cc:348: if (!DownloadTargetDeterminer::IsAdobeReaderUpToDate()) if (<is adobe the default reader> && ...
6 years, 1 month ago (2014-10-28 21:32:51 UTC) #12
palmer
https://codereview.chromium.org/665163005/diff/80001/chrome/browser/download/download_prefs.cc File chrome/browser/download/download_prefs.cc (right): https://codereview.chromium.org/665163005/diff/80001/chrome/browser/download/download_prefs.cc#newcode348 chrome/browser/download/download_prefs.cc:348: if (!DownloadTargetDeterminer::IsAdobeReaderUpToDate()) On 2014/10/28 21:32:50, asanka wrote: > if ...
6 years, 1 month ago (2014-10-28 22:38:39 UTC) #13
asanka
lgtm I'd suggest manual testing and adding a few TEST= notes for QA folks where ...
6 years, 1 month ago (2014-10-31 18:07:45 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/665163005/120001
6 years, 1 month ago (2014-11-07 20:34:09 UTC) #16
commit-bot: I haz the power
Committed patchset #7 (id:120001)
6 years, 1 month ago (2014-11-07 21:38:18 UTC) #17
commit-bot: I haz the power
6 years, 1 month ago (2014-11-07 21:39:45 UTC) #18
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/bfe0fce99e0da81fd9f07bd4cc4e6587cc342046
Cr-Commit-Position: refs/heads/master@{#303298}

Powered by Google App Engine
This is Rietveld 408576698