Private pages are offered for sharing |
||
Issue descriptionThrough the downloads UI, it is possible to choose an offline page to be shared. If the upgrade process has not run, this offline page might live in a non-public directory, and thus not be sharable. This could happen because the upgrade code is not yet written (as is the case now), or after the upgrade code is written, if the file failed to upgrade. In both these cases, we should detect the situation, and prevent sharing, either by graying out the menu item, or providing an error message of some kind. This will likely require sending across the OfflinePageBridge info about whether the page is in a public directory or not.
,
Mar 16 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e33f797641975feafe32aca36b4c8d0803a1128b commit e33f797641975feafe32aca36b4c8d0803a1128b Author: Pete Williamson <petewil@chromium.org> Date: Fri Mar 16 22:43:28 2018 Add unit tests for page sharing, and check for sharing from private dir. We should not be sharing files from our private directory, they are not sharable, and could cause a crash. This change marks the file as not sharable (when the P2P sharing flag is turned on) so we avoid the crash. To tell if the file is in a private directory, we add a new file to the OfflinePageBridge to get the information from the C++ side. Previously there were no unit tests for maybeShareOfflinePage(). This change adds some unit tests for it as a basis for checking the sharing restriction, then adds more tests for the sharing restriction. Bug: 817611 Change-Id: Ic0361a6eaf2698562a4998c2e027081c76318bc5 Reviewed-on: https://chromium-review.googlesource.com/961542 Commit-Queue: Peter Williamson <petewil@chromium.org> Reviewed-by: Jian Li <jianli@chromium.org> Cr-Commit-Position: refs/heads/master@{#543851} [modify] https://crrev.com/e33f797641975feafe32aca36b4c8d0803a1128b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridge.java [modify] https://crrev.com/e33f797641975feafe32aca36b4c8d0803a1128b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java [modify] https://crrev.com/e33f797641975feafe32aca36b4c8d0803a1128b/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtilsTest.java [modify] https://crrev.com/e33f797641975feafe32aca36b4c8d0803a1128b/chrome/browser/offline_pages/android/offline_page_bridge.cc [modify] https://crrev.com/e33f797641975feafe32aca36b4c8d0803a1128b/chrome/browser/offline_pages/android/offline_page_bridge.h
,
Mar 16 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by dewittj@chromium.org
, Mar 7 2018Status: Assigned (was: Untriaged)