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

Issue 1224273003: webapps: propogate name and shortName from manifest to Java (Closed)

Created:
5 years, 5 months ago by Lalit Maganti
Modified:
5 years, 5 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

webapps: propogate name and shortName from manifest to Java In the past we simply retrieved the name and short name and picked the latter to be the title if it existed or otherwise we used the former. The user was then able to edit the title and save the web app on their homescreen. This title was then used on the launcher as well as in recents. However, with the new splash screen which might be up soon, we need the long name from the website to display on the splash screen. It also looks better if recents utilizes the short name which is specified by the website rather than a user specified title which is used on the launcher. Because of all this, this CL propogates the info through various C++ and Java classes to allow the above usage. Now the user title is used just for the home screen icon. The name is used on the splash screen and the short name is used in recents. A note on backward compatibility: current webapps will simply use the user specified title which is currently saved in the intent - this CL only affects new webapps which the user adds after it lands. BUG=508628 Committed: https://crrev.com/f3ee51858aec43abdb498cb7d7ce778a121fd999 Cr-Commit-Position: refs/heads/master@{#339697}

Patch Set 1 #

Patch Set 2 : Fix compile on Android #

Patch Set 3 : Fix test compile on Android #

Total comments: 6

Patch Set 4 : Add unit tests #

Total comments: 1

Patch Set 5 : Fix Mounir's comments #

Patch Set 6 : Change style of commit message #

Total comments: 4

Patch Set 7 : Fix comments of code #

Patch Set 8 : Rebase on master #

Patch Set 9 : Rebase #

Patch Set 10 : Fix try issues #

Patch Set 11 : Fix cl issues #

Total comments: 14

Patch Set 12 : Fix comments on previous patch #

Total comments: 3

Patch Set 13 : Rebase #

Patch Set 14 : Fix nullness of name/shortname #

Patch Set 15 : Add back explict destructor #

Unified diffs Side-by-side diffs Delta from patch set Stats (+214 lines, -68 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +11 lines, -7 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenDialog.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/webapps/FullScreenActivityTab.java View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java View 3 chunks +7 lines, -5 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 8 chunks +44 lines, -13 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/ShortcutHelperTest.java View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappInfoTest.java View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +94 lines, -13 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappUrlBarTest.java View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappVisibilityTest.java View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/android/shortcut_data_fetcher.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/android/shortcut_data_fetcher.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/android/shortcut_helper.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/android/shortcut_helper.cc View 1 2 3 4 4 chunks +22 lines, -13 lines 0 comments Download
M chrome/browser/android/shortcut_info.h View 1 2 3 4 5 6 7 8 9 12 13 14 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/android/shortcut_info.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +13 lines, -3 lines 0 comments Download

Messages

Total messages: 48 (11 generated)
Lalit Maganti
5 years, 5 months ago (2015-07-09 15:00:37 UTC) #2
Lalit Maganti
5 years, 5 months ago (2015-07-09 15:03:13 UTC) #4
Lalit Maganti
5 years, 5 months ago (2015-07-09 15:03:37 UTC) #6
mlamouri (slow - plz ping)
It looks good. Could you add some tests? https://codereview.chromium.org/1224273003/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java File chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java (right): https://codereview.chromium.org/1224273003/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java#newcode778 chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java:778: nit: ...
5 years, 5 months ago (2015-07-09 16:34:17 UTC) #7
mlamouri (slow - plz ping)
https://codereview.chromium.org/1224273003/diff/60001/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappInfoTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappInfoTest.java (right): https://codereview.chromium.org/1224273003/diff/60001/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappInfoTest.java#newcode83 chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappInfoTest.java:83: public void testIntentShortNameFallBack() { We should fallback to title ...
5 years, 5 months ago (2015-07-09 16:38:39 UTC) #8
Lalit Maganti
5 years, 5 months ago (2015-07-09 17:48:43 UTC) #10
gone
+palmer for security concerns Chris: this CL seems to be introducing a difference between the ...
5 years, 5 months ago (2015-07-09 18:05:42 UTC) #12
gone
Also: what's the bug number?
5 years, 5 months ago (2015-07-09 18:07:55 UTC) #13
Lalit Maganti
Currently I don't think there is a bug open for this. I will consult with ...
5 years, 5 months ago (2015-07-09 18:19:02 UTC) #14
palmer
Definitely need a bug number. I'm a little skeptical of this change, because it seems ...
5 years, 5 months ago (2015-07-09 18:26:55 UTC) #15
mlamouri (slow - plz ping)
On 2015/07/09 at 18:26:55, palmer wrote: > Definitely need a bug number. Done. > I'm ...
5 years, 5 months ago (2015-07-09 19:44:36 UTC) #16
gone
> With Lalit's change, we still use the user defined title in the homescreen and ...
5 years, 5 months ago (2015-07-09 20:31:14 UTC) #17
gone
On 2015/07/09 20:31:14, dfalcantara wrote: > > With Lalit's change, we still use the user ...
5 years, 5 months ago (2015-07-09 20:31:39 UTC) #18
mlamouri (slow - plz ping)
On 2015/07/09 at 20:31:39, dfalcantara wrote: > On 2015/07/09 20:31:14, dfalcantara wrote: > > > ...
5 years, 5 months ago (2015-07-09 20:38:55 UTC) #19
gone
On 2015/07/09 20:38:55, Mounir Lamouri wrote: > On 2015/07/09 at 20:31:39, dfalcantara wrote: > > ...
5 years, 5 months ago (2015-07-10 01:44:57 UTC) #20
palmer
What's the procedure I follow to see how this works and looks in real life ...
5 years, 5 months ago (2015-07-10 19:05:39 UTC) #21
palmer
Also, the patch doesn't seem to apply. Maybe you need to rebase? /ssd/clank/src $ git ...
5 years, 5 months ago (2015-07-10 20:34:31 UTC) #22
Lalit Maganti
On 2015/07/10 at 20:34:31, palmer wrote: > Also, the patch doesn't seem to apply. Maybe ...
5 years, 5 months ago (2015-07-10 23:53:13 UTC) #23
Lalit Maganti
Have rebased the patch. Hopefully should be good for review on the security side.
5 years, 5 months ago (2015-07-13 10:13:59 UTC) #24
mlamouri (slow - plz ping)
On 2015/07/10 at 23:53:13, lalitm wrote: > On 2015/07/10 at 20:34:31, palmer wrote: > > ...
5 years, 5 months ago (2015-07-15 14:28:52 UTC) #25
mlamouri (slow - plz ping)
palmer@, is there anything you need to help with the security review on this change?
5 years, 5 months ago (2015-07-17 11:39:08 UTC) #26
palmer
OK, I think I get this now. LGTM.
5 years, 5 months ago (2015-07-20 18:08:56 UTC) #27
gone
nits, but lgtm with security approval https://codereview.chromium.org/1224273003/diff/200001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java (right): https://codereview.chromium.org/1224273003/diff/200001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java#newcode61 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java:61: name = name ...
5 years, 5 months ago (2015-07-20 22:19:13 UTC) #28
gone
https://codereview.chromium.org/1224273003/diff/200001/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappInfoTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappInfoTest.java (right): https://codereview.chromium.org/1224273003/diff/200001/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappInfoTest.java#newcode77 chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebappInfoTest.java:77: assertNotNull(info); nit: the expected values are always first in ...
5 years, 5 months ago (2015-07-20 22:20:17 UTC) #29
mlamouri (slow - plz ping)
lgtm with dfalcantara@ comments applied. https://codereview.chromium.org/1224273003/diff/200001/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java File chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java (right): https://codereview.chromium.org/1224273003/diff/200001/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java#newcode33 chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java:33: public static final String ...
5 years, 5 months ago (2015-07-20 23:55:59 UTC) #30
Lalit Maganti
mlamouri@: dfalcantara@: please see my replies/fixes to your comments. bauerb@: could you please review the ...
5 years, 5 months ago (2015-07-21 09:07:27 UTC) #32
mlamouri (slow - plz ping)
https://codereview.chromium.org/1224273003/diff/220001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java (right): https://codereview.chromium.org/1224273003/diff/220001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java#newcode39 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java:39: public static String titleFromIntent(Intent intent) { I don't think ...
5 years, 5 months ago (2015-07-21 10:24:47 UTC) #33
Lalit Maganti
https://codereview.chromium.org/1224273003/diff/220001/chrome/browser/android/shortcut_info.cc File chrome/browser/android/shortcut_info.cc (right): https://codereview.chromium.org/1224273003/diff/220001/chrome/browser/android/shortcut_info.cc#newcode30 chrome/browser/android/shortcut_info.cc:30: } On 2015/07/21 at 10:24:47, Mounir Lamouri wrote: > ...
5 years, 5 months ago (2015-07-21 10:26:44 UTC) #34
Bernhard Bauer
LGTM if ShortcutInfo::UpdateFromManifest() gets updated to deal with both values being null (or doesn't get ...
5 years, 5 months ago (2015-07-21 14:43:32 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1224273003/260001
5 years, 5 months ago (2015-07-21 16:58:01 UTC) #38
Lalit Maganti
https://codereview.chromium.org/1224273003/diff/200001/chrome/browser/android/shortcut_info.h File chrome/browser/android/shortcut_info.h (right): https://codereview.chromium.org/1224273003/diff/200001/chrome/browser/android/shortcut_info.h#newcode32 chrome/browser/android/shortcut_info.h:32: ~ShortcutInfo(); On 2015/07/21 at 09:07:27, Lalit Maganti wrote: > ...
5 years, 5 months ago (2015-07-21 17:22:24 UTC) #39
gone
Weird. Guess there's more going on in your destructor than is obvious.
5 years, 5 months ago (2015-07-21 17:23:15 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg_recipe/builds/99211)
5 years, 5 months ago (2015-07-21 17:25:28 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1224273003/280001
5 years, 5 months ago (2015-07-21 17:31:53 UTC) #45
commit-bot: I haz the power
Committed patchset #15 (id:280001)
5 years, 5 months ago (2015-07-21 18:13:21 UTC) #46
commit-bot: I haz the power
Patchset 15 (id:??) landed as https://crrev.com/f3ee51858aec43abdb498cb7d7ce778a121fd999 Cr-Commit-Position: refs/heads/master@{#339697}
5 years, 5 months ago (2015-07-21 18:15:22 UTC) #47
Bernhard Bauer
5 years, 5 months ago (2015-07-22 10:00:52 UTC) #48
Message was sent while issue was closed.
On 2015/07/21 17:23:15, dfalcantara wrote:
> Weird.  Guess there's more going on in your destructor than is obvious.

Yeah, there are three base::string16 destructors plus a GURL destructor, which
pushes the automatically generated destructor over the limit I guess.

Powered by Google App Engine
This is Rietveld 408576698