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

Issue 2935853002: [Android Refactor] Reland: Merge WebappDataStorage#LAST_USED_UNSET and LAST_USED_INVALID (Closed)

Created:
3 years, 6 months ago by pkotwicz
Modified:
3 years, 6 months ago
Reviewers:
dominickn
CC:
chromium-reviews, dominickn+watch_chromium.org, pkotwicz+watch_chromium.org, zpeng+watch_chromium.org, agrieve+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Android Refactor] Reland: Merge WebappDataStorage#LAST_USED_UNSET and LAST_USED_INVALID Having both LAST_USED_UNSET and LAST_USED_INVALID is unnecessary as - the "last_used" SharedPreference should never be set to LAST_USED_INVALID - there isn't any logic which checks whether "last_used" is LAST_USED_INVALID Additionally, this CL renames LAST_USED_INVALID to TIMESTAMP_INVALID as the getters for several time-based SharedPreferences other than "last_used" return LAST_USED_INVALID if the preference is unset. BUG=None Review-Url: https://codereview.chromium.org/2935853002 Cr-Commit-Position: refs/heads/master@{#479116} Committed: https://chromium.googlesource.com/chromium/src/+/6a35c14886cb036360d829b23a295af8fad93406

Patch Set 1 #

Patch Set 2 : ABCD #

Total comments: 3

Patch Set 3 : Merge branch 'master' into reland #

Messages

Total messages: 21 (12 generated)
pkotwicz
Dominick, can you please take a look? This CL is a reland of https://codereview.chromium.org/2927723003/ Patch ...
3 years, 6 months ago (2017-06-13 00:20:01 UTC) #3
dominickn
lgtm with a question https://codereview.chromium.org/2935853002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappRegistry.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappRegistry.java (right): https://codereview.chromium.org/2935853002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappRegistry.java#newcode116 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappRegistry.java:116: // The first read from ...
3 years, 6 months ago (2017-06-13 01:36:58 UTC) #4
pkotwicz
https://codereview.chromium.org/2935853002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappRegistry.java File chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappRegistry.java (right): https://codereview.chromium.org/2935853002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappRegistry.java#newcode116 chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappRegistry.java:116: // The first read from {@link WebappDataStorage} must be ...
3 years, 6 months ago (2017-06-13 03:14:29 UTC) #5
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/2935853002/60001
3 years, 6 months ago (2017-06-13 16:58:39 UTC) #8
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/2935853002/80001
3 years, 6 months ago (2017-06-13 17:05:05 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/287965) android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, ...
3 years, 6 months ago (2017-06-13 17:07:18 UTC) #15
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/2935853002/80001
3 years, 6 months ago (2017-06-13 19:07:46 UTC) #17
commit-bot: I haz the power
Committed patchset #3 (id:80001) as https://chromium.googlesource.com/chromium/src/+/6a35c14886cb036360d829b23a295af8fad93406
3 years, 6 months ago (2017-06-13 20:10:06 UTC) #20
dominickn
3 years, 6 months ago (2017-06-13 23:13:21 UTC) #21
Message was sent while issue was closed.
https://codereview.chromium.org/2935853002/diff/40001/chrome/android/java/src...
File
chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappRegistry.java
(right):

https://codereview.chromium.org/2935853002/diff/40001/chrome/android/java/src...
chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappRegistry.java:116:
// The first read from {@link WebappDataStorage} must be done in the background.
On 2017/06/13 03:14:29, pkotwicz wrote:
> Thank you for your question! It forced me to do more investigation. The strict
> mode exception is thrown by SharedPreferencesImpl#awaitLoadLocked() if the
> SharedPreferences have not finished loading.
>
http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/...
> 
> We would get a strict mode exception if we tried to access SharedPreferences
> immediately after the strict mode block in
WebappActivity#preInflationStartup()
> (I checked that this is the case)

Perhaps this bit of code should be moved to warmUpSharedPrefs then? The whole
purpose of warming shared prefs is to avoid this issue in one go....

Powered by Google App Engine
This is Rietveld 408576698