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

Issue 2833673003: 🔍 More consistent first run triggering (Closed)

Created:
3 years, 8 months ago by gone
Modified:
3 years, 8 months ago
Reviewers:
Ted C, nyquist, Yusuf
CC:
chromium-reviews, lizeb+watch-custom-tabs_chromium.org, agrieve+watch_chromium.org, pavely
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

🔍 More consistent first run triggering If the user tries to launch an AsyncInitializationActivity (tabbed mode or not), but has not yet gone through first run, force them to do so by launching it in the same way the ChromeLauncherActivity does it. By reusing the codepath, we reduce the number of ways we can mess up this flow. * Pull ChromeLauncherActivity#launchFirstRunExperience out into a static function in FirstRunFlowSequencer. * Simplify the logic to not care about whether it's in tabbed mode or not. * Call that function directly from ChromeLauncherActivity for all modes (tabbed or otherwise) * Also call it from AsyncInitializationActivity in the failure case. This requires fixing ChromeActivity#destroy() so that it doesn't try to undo anything that didn't happen because the Activity was killed early. * Makes the SearchWidgetProvider check if First Run is required before allowing the user into the SearchActivity. * Fixes how PendingIntent flags are created for FirstRun. It was, for some reason, using the Intent's flags instead of using PendingIntent flags. * Take out the "First Run Experience" app label. Going to Recents and seeing it is strange. It just uses the app name, now. * Replaces a bunch of the old tests with new ones that account for redirecting. * Fixes SyncTestBase so that it clears data before creating a SharedPref. This caches the SharedPrefs and makes the data clear completely useless, causing different test runs to affect each other. BUG=708844, 710952, 616456 Review-Url: https://codereview.chromium.org/2833673003 Cr-Commit-Position: refs/heads/master@{#466748} Committed: https://chromium.googlesource.com/chromium/src/+/40127a47c9fb31fbc46aff7a7ad6f5bd8ea09418

Patch Set 1 #

Patch Set 2 : 🔍 More consistent first run triggering #

Patch Set 3 : 🔍 More consistent first run triggering #

Total comments: 4

Patch Set 4 : 🔍 More consistent first run triggering #

Total comments: 4

Patch Set 5 : 🔍 More consistent first run triggering #

Patch Set 6 : Rebased #

Patch Set 7 : 🔍 More consistent first run triggering #

Patch Set 8 : Take out the FRE label #

Total comments: 11

Patch Set 9 : 🔍 More consistent first run triggering #

Patch Set 10 : 🔍 More consistent first run triggering #

Patch Set 11 : singleTop vs singleInstance #

Patch Set 12 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+437 lines, -208 lines) Patch
M chrome/android/java/AndroidManifest.xml View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java View 1 2 3 4 5 3 chunks +8 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java View 1 2 3 3 chunks +15 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java View 1 2 3 7 chunks +5 lines, -113 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java View 1 2 3 4 2 chunks +11 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java View 1 2 3 4 5 6 7 8 9 10 4 chunks +105 lines, -10 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java View 1 2 3 4 chunks +21 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java View 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchWidgetProvider.java View 1 2 3 4 chunks +10 lines, -5 lines 0 comments Download
M chrome/android/java/strings/android_chrome_strings.grd View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/firstrun/FirstRunIntegrationTest.java View 1 2 3 4 2 chunks +132 lines, -29 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/searchwidget/SearchWidgetProviderTest.java View 1 2 3 4 5 6 7 8 8 chunks +63 lines, -37 lines 0 comments Download
M chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/FirstRunTest.java View 1 2 3 4 5 6 7 8 9 4 chunks +56 lines, -4 lines 0 comments Download
M chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/SyncTestBase.java View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 70 (50 generated)
gone
The last suite of First Run tests is giving me some grief because I think ...
3 years, 8 months ago (2017-04-20 07:32:00 UTC) #13
Ted C
Overall, this seems ok to me (didn't look at the tests though) I thought redirectsToFirstRunIfNecessary ...
3 years, 8 months ago (2017-04-20 16:58:03 UTC) #16
gone
Renamed it to "requiresFirstRunToBeCompleted". Better maybe? https://codereview.chromium.org/2833673003/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java File chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java (right): https://codereview.chromium.org/2833673003/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java#newcode332 chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java:332: } else { ...
3 years, 8 months ago (2017-04-20 17:09:15 UTC) #17
Yusuf
https://codereview.chromium.org/2833673003/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java File chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java (right): https://codereview.chromium.org/2833673003/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java#newcode281 chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java:281: super.onCreate(null); should we be worried about this getting called ...
3 years, 8 months ago (2017-04-20 18:19:10 UTC) #18
gone
https://codereview.chromium.org/2833673003/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java File chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java (right): https://codereview.chromium.org/2833673003/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java#newcode281 chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java:281: super.onCreate(null); On 2017/04/20 18:19:10, Yusuf wrote: > should we ...
3 years, 8 months ago (2017-04-21 00:23:53 UTC) #19
gone
I *think* I got the sync FirstRunTest working. I'm not happy about the way I ...
3 years, 8 months ago (2017-04-21 01:04:17 UTC) #25
Ted C
https://codereview.chromium.org/2833673003/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java File chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java (right): https://codereview.chromium.org/2833673003/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java#newcode257 chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java:257: abortLaunch(); pre-L, if you call finish in onCreate does ...
3 years, 8 months ago (2017-04-21 04:41:42 UTC) #35
gone
https://codereview.chromium.org/2833673003/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java File chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java (right): https://codereview.chromium.org/2833673003/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java#newcode257 chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java:257: abortLaunch(); On 2017/04/21 04:41:42, Ted C wrote: > pre-L, ...
3 years, 8 months ago (2017-04-21 17:05:06 UTC) #36
Ted C
https://codereview.chromium.org/2833673003/diff/140001/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/FirstRunTest.java File chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/FirstRunTest.java (right): https://codereview.chromium.org/2833673003/diff/140001/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/FirstRunTest.java#newcode37 chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/FirstRunTest.java:37: @CommandLineFlags.Remove(ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE) On 2017/04/21 17:05:06, slow (dfalcantara) wrote: > On ...
3 years, 8 months ago (2017-04-21 17:13:12 UTC) #37
gone
https://codereview.chromium.org/2833673003/diff/140001/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/FirstRunTest.java File chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/FirstRunTest.java (right): https://codereview.chromium.org/2833673003/diff/140001/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/FirstRunTest.java#newcode37 chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/FirstRunTest.java:37: @CommandLineFlags.Remove(ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE) On 2017/04/21 17:13:12, Ted C wrote: > On ...
3 years, 8 months ago (2017-04-21 17:15:55 UTC) #38
gone
Figured out why I had to set the SharedPreference before the test ran. Turns out ...
3 years, 8 months ago (2017-04-21 18:36:15 UTC) #45
Ted C
lgtm https://codereview.chromium.org/2833673003/diff/140001/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/FirstRunTest.java File chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/FirstRunTest.java (right): https://codereview.chromium.org/2833673003/diff/140001/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/FirstRunTest.java#newcode37 chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/FirstRunTest.java:37: @CommandLineFlags.Remove(ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE) On 2017/04/21 17:15:55, slow (dfalcantara) wrote: > ...
3 years, 8 months ago (2017-04-21 21:47:19 UTC) #50
gone
Eh heh, sorry for the churn but I've switched it to use singleInstance instead of ...
3 years, 8 months ago (2017-04-21 22:51:40 UTC) #51
Ted C
On 2017/04/21 22:51:40, slow (dfalcantara) wrote: > Eh heh, sorry for the churn but I've ...
3 years, 8 months ago (2017-04-24 16:50:12 UTC) #60
gone
On 2017/04/24 16:50:12, Ted C wrote: > On 2017/04/21 22:51:40, slow (dfalcantara) wrote: > > ...
3 years, 8 months ago (2017-04-24 18:06:57 UTC) #61
gone
On 2017/04/24 18:06:57, slow (dfalcantara) wrote: > On 2017/04/24 16:50:12, Ted C wrote: > > ...
3 years, 8 months ago (2017-04-24 18:19:28 UTC) #62
nyquist
//chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync lgtm
3 years, 8 months ago (2017-04-24 20:27:46 UTC) #63
gone
Talked with Yusuf. Good to land.
3 years, 8 months ago (2017-04-24 20:29:11 UTC) #64
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/2833673003/220001
3 years, 8 months ago (2017-04-24 20:30:12 UTC) #67
commit-bot: I haz the power
3 years, 8 months ago (2017-04-24 20:38:33 UTC) #70
Message was sent while issue was closed.
Committed patchset #12 (id:220001) as
https://chromium.googlesource.com/chromium/src/+/40127a47c9fb31fbc46aff7a7ad6...

Powered by Google App Engine
This is Rietveld 408576698