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

Issue 2203273002: navigator.share: Resolve promise only after user chooses a target. (Closed)

Created:
4 years, 4 months ago by Matt Giuca
Modified:
4 years, 4 months ago
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, Ted C, gone
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

navigator.share: Resolve promise only after user chooses a target. Previously, would immediately resolve as soon as the share dialog was shown. This introduces a new issue where the promise *never* resolves or rejects if the user cancels the share picker (I'm not sure how to do this or if it's even possible). Introduces a bunch of new functionality in the ShareHelper class to support this new use case. Reland of https://crrev.com/410511 (to fix https://crbug.com/637194). BUG=595608, 637194 Committed: https://crrev.com/906820b686d31b48d8c75e89ec3fe67b5c9f36b0 Cr-Commit-Position: refs/heads/master@{#412175}

Patch Set 1 #

Patch Set 2 : Fix compile (tests). #

Total comments: 1

Patch Set 3 : Fix pre-LMR1 share picker to work like the LMR1 version. #

Total comments: 4

Patch Set 4 : Rebase. #

Patch Set 5 : Respond to review. #

Patch Set 6 : Rebase. #

Patch Set 7 : Null-check callback. Fixes crbug.com/637194. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -64 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/share/ShareHelper.java View 1 2 3 4 5 6 14 chunks +96 lines, -31 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/webshare/ShareServiceImpl.java View 1 2 3 4 3 chunks +15 lines, -30 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/share/ShareUrlTest.java View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 40 (26 generated)
Matt Giuca
Hi David, (+cc Ted who has done recent work on ShareHelper; Dan who reviewed my ...
4 years, 4 months ago (2016-08-03 08:31:31 UTC) #8
David Trainor- moved to gerrit
On 2016/08/03 08:31:31, Matt Giuca wrote: > Hi David, > > (+cc Ted who has ...
4 years, 4 months ago (2016-08-05 16:06:39 UTC) #15
David Trainor- moved to gerrit
gah forgot to publish https://codereview.chromium.org/2203273002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/share/ShareHelper.java File chrome/android/java/src/org/chromium/chrome/browser/share/ShareHelper.java (right): https://codereview.chromium.org/2203273002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/share/ShareHelper.java#newcode498 chrome/android/java/src/org/chromium/chrome/browser/share/ShareHelper.java:498: if (url != null && ...
4 years, 4 months ago (2016-08-05 16:06:54 UTC) #16
Matt Giuca
Thanks. https://codereview.chromium.org/2203273002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/share/ShareHelper.java File chrome/android/java/src/org/chromium/chrome/browser/share/ShareHelper.java (right): https://codereview.chromium.org/2203273002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/share/ShareHelper.java#newcode498 chrome/android/java/src/org/chromium/chrome/browser/share/ShareHelper.java:498: if (url != null && url.length() > 0) ...
4 years, 4 months ago (2016-08-08 04:54:43 UTC) #17
David Trainor- moved to gerrit
lgtm. I'd still support pulling out url and text and making that the choice of ...
4 years, 4 months ago (2016-08-08 23:03:31 UTC) #22
Matt Giuca
On 2016/08/08 23:03:31, David Trainor wrote: > lgtm. I'd still support pulling out url and ...
4 years, 4 months ago (2016-08-09 00:11:14 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2203273002/80001
4 years, 4 months ago (2016-08-09 00:12:00 UTC) #25
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 4 months ago (2016-08-09 00:17:13 UTC) #26
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/610f5e1ea1b1b38926263489d3d235fc834686de Cr-Commit-Position: refs/heads/master@{#410511}
4 years, 4 months ago (2016-08-09 00:20:04 UTC) #28
amineer
A revert of this CL (patchset #5 id:80001) has been created in https://codereview.chromium.org/2241303002/ by amineer@chromium.org. ...
4 years, 4 months ago (2016-08-15 16:14:59 UTC) #29
Matt Giuca
Thanks, Alex. Re-opening with a new patch set that fixes the crash.
4 years, 4 months ago (2016-08-16 05:20:41 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2203273002/140001
4 years, 4 months ago (2016-08-16 05:21:01 UTC) #36
commit-bot: I haz the power
Committed patchset #7 (id:140001)
4 years, 4 months ago (2016-08-16 05:58:02 UTC) #38
commit-bot: I haz the power
4 years, 4 months ago (2016-08-16 05:59:50 UTC) #40
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/906820b686d31b48d8c75e89ec3fe67b5c9f36b0
Cr-Commit-Position: refs/heads/master@{#412175}

Powered by Google App Engine
This is Rietveld 408576698