New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 622139 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Email to this user bounced
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Feature



Sign in to add a comment

Enable sharing offline pages between devices.

Project Member Reported by weiran@google.com, Jun 22 2016

Issue description

This is an experimental feature for summer intern project. The main objective is to enable a share button that could share offline pages as mhtml attachment. The feature would only be enabled if the "offline page sharing" flag is on.

What steps will reproduce the problem?
(1) Design the offline page sharing feature.
(2) Implement a flag for offline page sharing.
(3) Implement sharing offline pages by sending intent.
(4) Implement file archiving for the received file.

 
Project Member

Comment 1 by sheriffbot@chromium.org, Jun 22 2016

Labels: Hotlist-Google
Project Member

Comment 2 by bugdroid1@chromium.org, Jul 21 2016

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

commit 4357adacf634f51c2a885316e38288beb2fda99a
Author: weiran <weiran@google.com>
Date: Thu Jul 21 22:51:18 2016

Flag for Offline Page Sharing

This is a flag for the experimental offline page sharing feature. It defalts to off.
Will update the bug number once get approval from dimich to issue a bug for the project.

BUG= 622139 

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

[modify] https://crrev.com/4357adacf634f51c2a885316e38288beb2fda99a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridge.java
[modify] https://crrev.com/4357adacf634f51c2a885316e38288beb2fda99a/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridgeTest.java
[modify] https://crrev.com/4357adacf634f51c2a885316e38288beb2fda99a/chrome/app/generated_resources.grd
[modify] https://crrev.com/4357adacf634f51c2a885316e38288beb2fda99a/chrome/browser/about_flags.cc
[modify] https://crrev.com/4357adacf634f51c2a885316e38288beb2fda99a/chrome/browser/android/chrome_feature_list.cc
[modify] https://crrev.com/4357adacf634f51c2a885316e38288beb2fda99a/chrome/browser/android/offline_pages/offline_page_bridge.cc
[modify] https://crrev.com/4357adacf634f51c2a885316e38288beb2fda99a/components/offline_pages/offline_page_feature.cc
[modify] https://crrev.com/4357adacf634f51c2a885316e38288beb2fda99a/components/offline_pages/offline_page_feature.h
[modify] https://crrev.com/4357adacf634f51c2a885316e38288beb2fda99a/components/offline_pages/offline_page_model_impl_unittest.cc

Comment 4 by weiran@google.com, Jul 27 2016

Components: UI>Browser>Offline
Project Member

Comment 5 by bugdroid1@chromium.org, Jul 27 2016

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

commit 6d63d246b893f5033749391030e8a36172356c3a
Author: weiran <weiran@google.com>
Date: Wed Jul 27 21:30:44 2016

[Offline Page]Making mhtml file recognized as openable by Chrome.

There are several scenarios that user want to open an mhtml file of offline page: from third party apps when user receive the file as attachment, from Android’s download home, and from file manager apps. The third party apps that offline page sharing feature intended to make use of are Gmail, ShareIt, Xender, Beam and Drive. Each of these schemes differs in the intent sent out when trying to open the mhtml file.

This CL made changes on the intent filters so that Chrome would be known to the system as a handler of mhtml VIEW intent in different schemes.

First filter only declares mimeType, enables intent that keeps the mimeType "multipart/related" (Beam,Drive,Download, File Manager).
Second filter declares the pathPatter, enables intent that lost the mimeType but keeps the ".mhtml" postfix (Xender).
The last filter added [mimeType=”*/*”], enables ShareIt open the file.

Deleting either of the intent filter will cause at least one scheme not working properly.

Drive and Download use content uri, which is not considered as local url. In MHTMLArchive::create, mhtml pages from non-local URLs are blocked for security reasons. As a result, content won't show properly. Related discussion can be seen in  bug 630753 .

BUG= 622139 

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

[modify] https://crrev.com/6d63d246b893f5033749391030e8a36172356c3a/chrome/android/java/AndroidManifest.xml

Project Member

Comment 6 by bugdroid1@chromium.org, Aug 17 2016

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

commit be3aae7913a59268351546d2a17686fd5a79371a
Author: weiran <weiran@google.com>
Date: Wed Aug 17 22:11:34 2016

Primary implementation of offline page sharing

This is the primary implementation of offline page sharing feature.
If current tab is an offline page, clicking on share would result in:
  the corresponding mhtml file copied to the external storage, and,
  the the copied file in the external storage is passed in intent to be shared using third party application.

BUG= 622139 

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

[modify] https://crrev.com/be3aae7913a59268351546d2a17686fd5a79371a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
[modify] https://crrev.com/be3aae7913a59268351546d2a17686fd5a79371a/chrome/android/java/src/org/chromium/chrome/browser/DeferredStartupHandler.java
[modify] https://crrev.com/be3aae7913a59268351546d2a17686fd5a79371a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java
[modify] https://crrev.com/be3aae7913a59268351546d2a17686fd5a79371a/chrome/android/java/src/org/chromium/chrome/browser/share/ShareHelper.java
[modify] https://crrev.com/be3aae7913a59268351546d2a17686fd5a79371a/chrome/android/java/src/org/chromium/chrome/browser/webshare/ShareServiceImpl.java
[modify] https://crrev.com/be3aae7913a59268351546d2a17686fd5a79371a/chrome/android/javatests/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtilsTest.java
[modify] https://crrev.com/be3aae7913a59268351546d2a17686fd5a79371a/chrome/android/javatests/src/org/chromium/chrome/browser/share/ShareUrlTest.java
[modify] https://crrev.com/be3aae7913a59268351546d2a17686fd5a79371a/chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtilsTest.java

Comment 8 by weiran@google.com, Aug 19 2016

Status: Fixed (was: Assigned)

Sign in to add a comment