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

Issue 1286973003: webapps: introduce helper class to store extended set of data (Closed)

Created:
5 years, 4 months ago by Lalit Maganti
Modified:
5 years, 3 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: introduce helper class to store extended set of data Storing data in the intent is not scalable and leads to ugly methods which accept many parameters. Here, a new class is introduced which allows more data to be stored about webapps without pushing them all into the intent. Other usecases include updating this data from the manifest every time the webapp is opened and this is especially useful for the introduction of the splashscreen icon as it can be put here after the intent is created. This is a part of a group of CLs: (1) https://codereview.chromium.org/1286973003 (this) (2) https://codereview.chromium.org/1310223002 (3) https://codereview.chromium.org/1239923002 BUG=508627 Committed: https://crrev.com/8d4bb0fdd64d96a3cdf0d9414781c60c51a39b70 Cr-Commit-Position: refs/heads/master@{#345970}

Patch Set 1 #

Patch Set 2 : Remove unecessary patch #

Patch Set 3 : Fix compile #

Total comments: 4

Patch Set 4 : Make stuff async #

Patch Set 5 : Make Put async as well #

Patch Set 6 : Add accessed date to storage #

Total comments: 10

Patch Set 7 : Address review comments #

Patch Set 8 : Address missed comment #

Total comments: 21

Patch Set 9 : Address review comments #

Total comments: 17

Patch Set 10 : Fix review comments #

Patch Set 11 : Fix minor issues #

Total comments: 15

Patch Set 12 : Fix oversights #

Patch Set 13 : Fix review comments and remaining issues #

Patch Set 14 : Add tests and refactor utils into ShortcutHelper #

Patch Set 15 : Fix minor mistakes in comments #

Patch Set 16 : Switch from Instrumentation to Unit test #

Total comments: 9

Patch Set 17 : Remove usage of AtomicBoolean #

Patch Set 18 : Address comments on review #

Patch Set 19 : Fix comment #

Patch Set 20 : Fix assert in callback #

Total comments: 4

Patch Set 21 : Fix nit in previous patch #

Patch Set 22 : Make findbugs happy #

Patch Set 23 : Fix minor issue #

Unified diffs Side-by-side diffs Delta from patch set Stats (+313 lines, -14 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 12 13 14 15 16 17 18 19 20 4 chunks +28 lines, -7 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +148 lines, -0 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 2 chunks +1 line, -7 lines 0 comments Download
A chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappDataStorageTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +136 lines, -0 lines 0 comments Download

Messages

Total messages: 51 (9 generated)
Lalit Maganti
Just a quick sketch up of an idea to resolve stuffing all webapp data into ...
5 years, 4 months ago (2015-08-12 15:46:41 UTC) #2
gone
Huh, very clever. I was concerned about having one large SharedPreferences file for all the ...
5 years, 4 months ago (2015-08-12 22:32:32 UTC) #3
Lalit Maganti
On 2015/08/12 22:32:32, dfalcantara wrote: > Huh, very clever. I was concerned about having one ...
5 years, 4 months ago (2015-08-13 09:54:00 UTC) #4
mlamouri (slow - plz ping)
https://codereview.chromium.org/1286973003/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java (right): https://codereview.chromium.org/1286973003/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode32 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:32: public Bitmap getSplashIcon() { Is that call synchronous? Is ...
5 years, 4 months ago (2015-08-13 11:21:01 UTC) #5
Lalit Maganti
https://codereview.chromium.org/1286973003/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java (right): https://codereview.chromium.org/1286973003/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode32 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:32: public Bitmap getSplashIcon() { On 2015/08/13 11:21:01, Mounir Lamouri ...
5 years, 4 months ago (2015-08-18 12:45:46 UTC) #6
Lalit Maganti
Dan: could you please take a look at this patch before I add the registry ...
5 years, 4 months ago (2015-08-24 19:27:56 UTC) #7
gone
https://chromiumcodereview.appspot.com/1286973003/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java (right): https://chromiumcodereview.appspot.com/1286973003/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode94 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:94: return fetchSharedPreference(); Is there any reason why you set ...
5 years, 4 months ago (2015-08-24 20:22:46 UTC) #8
Lalit Maganti
https://chromiumcodereview.appspot.com/1286973003/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java (right): https://chromiumcodereview.appspot.com/1286973003/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode94 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:94: return fetchSharedPreference(); On 2015/08/24 20:22:46, dfalcantara wrote: > Is ...
5 years, 4 months ago (2015-08-24 20:34:23 UTC) #9
gone
https://chromiumcodereview.appspot.com/1286973003/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java (right): https://chromiumcodereview.appspot.com/1286973003/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode94 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:94: return fetchSharedPreference(); On 2015/08/24 20:34:23, Lalit Maganti wrote: > ...
5 years, 4 months ago (2015-08-24 20:37:33 UTC) #10
Lalit Maganti
https://chromiumcodereview.appspot.com/1286973003/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java (right): https://chromiumcodereview.appspot.com/1286973003/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode94 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:94: return fetchSharedPreference(); On 2015/08/24 20:37:33, dfalcantara wrote: > On ...
5 years, 4 months ago (2015-08-24 20:43:20 UTC) #11
gone
https://chromiumcodereview.appspot.com/1286973003/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java (right): https://chromiumcodereview.appspot.com/1286973003/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode94 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:94: return fetchSharedPreference(); On 2015/08/24 20:43:20, Lalit Maganti wrote: > ...
5 years, 4 months ago (2015-08-24 20:57:36 UTC) #12
Lalit Maganti
https://chromiumcodereview.appspot.com/1286973003/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java (right): https://chromiumcodereview.appspot.com/1286973003/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode94 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:94: return fetchSharedPreference(); On 2015/08/24 20:57:36, dfalcantara wrote: > On ...
5 years, 4 months ago (2015-08-24 21:00:16 UTC) #13
gone
https://chromiumcodereview.appspot.com/1286973003/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java (right): https://chromiumcodereview.appspot.com/1286973003/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode38 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:38: String icon = mPreferences.getString("splash_icon", ""); Pull these keys into ...
5 years, 4 months ago (2015-08-24 21:15:16 UTC) #14
Lalit Maganti
https://codereview.chromium.org/1286973003/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java (right): https://codereview.chromium.org/1286973003/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode38 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:38: String icon = mPreferences.getString("splash_icon", ""); On 2015/08/24 21:15:16, dfalcantara ...
5 years, 4 months ago (2015-08-25 13:35:17 UTC) #15
gone
https://chromiumcodereview.appspot.com/1286973003/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java (right): https://chromiumcodereview.appspot.com/1286973003/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode29 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:29: Context.MODE_PRIVATE); nit: indentation is off. https://chromiumcodereview.appspot.com/1286973003/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode33 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:33: public static ...
5 years, 4 months ago (2015-08-26 01:28:38 UTC) #16
Lalit Maganti
Dan: please see my inline comments. I've responded to your feedback as well as some ...
5 years, 4 months ago (2015-08-26 09:45:44 UTC) #17
Lalit Maganti
https://codereview.chromium.org/1286973003/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java (right): https://codereview.chromium.org/1286973003/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode43 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:43: return this; On 2015/08/26 09:45:44, Lalit Maganti wrote: > ...
5 years, 4 months ago (2015-08-26 09:48:13 UTC) #18
mlamouri (slow - plz ping)
Could you have tests for that? https://codereview.chromium.org/1286973003/diff/160001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java (right): https://codereview.chromium.org/1286973003/diff/160001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode23 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:23: private static final ...
5 years, 3 months ago (2015-08-26 13:41:04 UTC) #19
gone
https://chromiumcodereview.appspot.com/1286973003/diff/160001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java (right): https://chromiumcodereview.appspot.com/1286973003/diff/160001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode34 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:34: * Implementation detail: This WebappDataStorage object returned utilizes nits: ...
5 years, 3 months ago (2015-08-26 21:03:09 UTC) #20
gone
https://chromiumcodereview.appspot.com/1286973003/diff/160001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java (right): https://chromiumcodereview.appspot.com/1286973003/diff/160001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode48 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:48: * the open function) asynchrously. On 2015/08/26 21:03:09, dfalcantara ...
5 years, 3 months ago (2015-08-26 21:04:57 UTC) #21
Lalit Maganti
https://codereview.chromium.org/1286973003/diff/160001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java (right): https://codereview.chromium.org/1286973003/diff/160001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode23 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:23: private static final String KEY_LAST_ACCESSED = "last_accessed"; On 2015/08/26 ...
5 years, 3 months ago (2015-08-26 21:20:42 UTC) #22
gone
https://codereview.chromium.org/1286973003/diff/160001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java (right): https://codereview.chromium.org/1286973003/diff/160001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode73 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:73: public void update(final Bitmap splashscreenImage) { On 2015/08/26 21:20:41, ...
5 years, 3 months ago (2015-08-26 21:56:14 UTC) #23
Lalit Maganti
I forget: did we agree on having an explicit registry or iterate over shared prefs ...
5 years, 3 months ago (2015-08-26 22:33:54 UTC) #24
Lalit Maganti
Scratch "And if we are iterating should the registry form a part of this patch ...
5 years, 3 months ago (2015-08-26 22:35:57 UTC) #25
gone
I think we settled on using a registry, which can come after this CL. But ...
5 years, 3 months ago (2015-08-26 22:40:12 UTC) #26
Lalit Maganti
Decided to test it with an instrumentation test as there is a heavy reliance on ...
5 years, 3 months ago (2015-08-27 14:02:58 UTC) #27
mlamouri (slow - plz ping)
Can you check whether the test can be run using roboelectrik?
5 years, 3 months ago (2015-08-27 14:09:47 UTC) #28
Lalit Maganti
On 2015/08/27 at 14:09:47, mlamouri wrote: > Can you check whether the test can be ...
5 years, 3 months ago (2015-08-27 16:07:25 UTC) #29
mlamouri (slow - plz ping)
lgtm. Thanks for using a roboelectric test! :) https://codereview.chromium.org/1286973003/diff/290001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java (right): https://codereview.chromium.org/1286973003/diff/290001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode16 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:16: * ...
5 years, 3 months ago (2015-08-27 16:18:24 UTC) #30
Lalit Maganti
https://codereview.chromium.org/1286973003/diff/290001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java (right): https://codereview.chromium.org/1286973003/diff/290001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode83 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:83: callback.onDataRetrieved(result == -1L ? null : result); On 2015/08/27 ...
5 years, 3 months ago (2015-08-27 16:24:34 UTC) #31
mlamouri (slow - plz ping)
https://codereview.chromium.org/1286973003/diff/290001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java (right): https://codereview.chromium.org/1286973003/diff/290001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode83 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:83: callback.onDataRetrieved(result == -1L ? null : result); On 2015/08/27 ...
5 years, 3 months ago (2015-08-27 16:29:30 UTC) #32
Lalit Maganti
https://codereview.chromium.org/1286973003/diff/290001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java (right): https://codereview.chromium.org/1286973003/diff/290001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java#newcode83 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java:83: callback.onDataRetrieved(result == -1L ? null : result); On 2015/08/27 ...
5 years, 3 months ago (2015-08-27 16:40:30 UTC) #33
gone
lgtm mostly. https://codereview.chromium.org/1286973003/diff/370001/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/1286973003/diff/370001/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java#newcode124 chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java:124: String encodedIcon = icon == null ? ...
5 years, 3 months ago (2015-08-27 18:24:21 UTC) #34
gone
lgtm again https://chromiumcodereview.appspot.com/1286973003/diff/370001/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappDataStorageTest.java File chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappDataStorageTest.java (right): https://chromiumcodereview.appspot.com/1286973003/diff/370001/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappDataStorageTest.java#newcode51 chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappDataStorageTest.java:51: public void testLastUsedRetrieval() throws InterruptedException { On ...
5 years, 3 months ago (2015-08-27 18:31:23 UTC) #35
Lalit Maganti
https://codereview.chromium.org/1286973003/diff/370001/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/1286973003/diff/370001/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java#newcode124 chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java:124: String encodedIcon = icon == null ? "" : ...
5 years, 3 months ago (2015-08-27 18:36:56 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1286973003/390001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1286973003/390001
5 years, 3 months ago (2015-08-27 18:38:07 UTC) #39
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/114179)
5 years, 3 months ago (2015-08-27 19:08:50 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1286973003/280005 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1286973003/280005
5 years, 3 months ago (2015-08-27 19:18:03 UTC) #44
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/61671)
5 years, 3 months ago (2015-08-27 19:40:19 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1286973003/410001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1286973003/410001
5 years, 3 months ago (2015-08-27 20:12:21 UTC) #49
commit-bot: I haz the power
Committed patchset #23 (id:410001)
5 years, 3 months ago (2015-08-27 20:18:00 UTC) #50
commit-bot: I haz the power
5 years, 3 months ago (2015-08-27 20:18:50 UTC) #51
Message was sent while issue was closed.
Patchset 23 (id:??) landed as
https://crrev.com/8d4bb0fdd64d96a3cdf0d9414781c60c51a39b70
Cr-Commit-Position: refs/heads/master@{#345970}

Powered by Google App Engine
This is Rietveld 408576698