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

Issue 2047483003: Add fallback behavior if the last used profile cannot initialize (Closed)

Created:
4 years, 6 months ago by WC Leung
Modified:
4 years, 4 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@bug-614753-fix
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add fallback behavior if the last used profile cannot initialize Before this CL, if the last used profile cannot be initialized, it will be a silent exit in Windows and a CHECK failure in other platforms. In this CL a list of possible fall-back behavior are used (from the top to the bottom): (1) open other last opened profiles which was not signed out. (2) open the user manager (guest profile & system profile) (3) open other profiles which was not signed out. (4) at last, show a message box and do not start chromium. BUG=614753 Committed: https://crrev.com/2873496dd5bb12be052aa1c5a341637faade926d Cr-Commit-Position: refs/heads/master@{#409023}

Patch Set 1 : Updated code #

Total comments: 2

Patch Set 2 : Added translatable strings and histogram to the dialog boxes #

Total comments: 7

Patch Set 3 : Rebase #

Total comments: 1

Patch Set 4 : Refactored startup profile choosing code, reduced number of messages, bug fix (oops) #

Total comments: 36

Patch Set 5 : Add tests #

Patch Set 6 : Fix startup failure if unable to create system profile. #

Patch Set 7 : Respond to pkasting@'s comments, minor changes to test code #

Patch Set 8 : Added a missing test (oops) #

Total comments: 2

Patch Set 9 : Handle the case where the selected profile is not in ProfileAttributesStorage #

Total comments: 56

Patch Set 10 : Respond to pkasting@'s comments #

Total comments: 8

Patch Set 11 : Copy base/test/* from CL 2061593002 #

Patch Set 12 : Respond to pkasting@'s comments #

Patch Set 13 : Respond to comments, copy base/test/* from CL 2061593002 again. #

Total comments: 66

Patch Set 14 : Respond to pkasting@'s comments #

Patch Set 15 : Fix clang compile error #

Total comments: 16

Patch Set 16 : Rebase #

Patch Set 17 : Add missing #include (left out by bad rebase :-( ) #

Patch Set 18 : Respond to comments. #

Patch Set 19 : Fix a mistake in a comment. (Didn't check Atom reflow output, sorry :-( ) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+609 lines, -79 lines) Patch
M base/test/test_file_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +11 lines, -0 lines 0 comments Download
M base/test/test_file_util_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +47 lines, -37 lines 0 comments Download
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +8 lines, -3 lines 0 comments Download
M chrome/browser/chrome_browser_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +27 lines, -37 lines 0 comments Download
M chrome/browser/profiles/profiles_state.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/profiles/profiles_state.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/profile_error_dialog.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/startup/startup_browser_creator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +17 lines, -0 lines 0 comments Download
M chrome/browser/ui/startup/startup_browser_creator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +73 lines, -0 lines 0 comments Download
A chrome/browser/ui/startup/startup_browser_creator_corrupt_profiles_browsertest_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +420 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 89 (43 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2047483003/1
4 years, 6 months ago (2016-06-06 19:43:45 UTC) #5
WC Leung
Here's the second CL of bug 614753, which takes care of the last used profile. ...
4 years, 6 months ago (2016-06-06 19:49:33 UTC) #6
WC Leung
+sky Messed up with a old commit and wrong list of reviewers (sorry to Peter). ...
4 years, 6 months ago (2016-06-06 20:01:36 UTC) #9
sky
sky->brettw as Brett is reviewing your dependent patch and is an owner of this as ...
4 years, 6 months ago (2016-06-06 22:23:32 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2047483003/20001
4 years, 6 months ago (2016-06-07 00:05:08 UTC) #13
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-07 01:13:51 UTC) #15
WC Leung
Brett: ping. Anyway feel free to defer the review to another owner because what sky@ ...
4 years, 6 months ago (2016-06-09 23:18:05 UTC) #16
brettw
falling back to other profiles seems like a potentially dangerous thing me. Is there a ...
4 years, 6 months ago (2016-06-13 20:21:34 UTC) #17
WC Leung
On 2016/06/13 20:21:34, brettw wrote: > falling back to other profiles seems like a potentially ...
4 years, 6 months ago (2016-06-13 22:40:50 UTC) #18
brettw
I understand this patch more now. I thought initially it handled a more broad class ...
4 years, 6 months ago (2016-06-14 00:02:07 UTC) #19
WC Leung
New patch uploaded. Brett: The test were not added yet. But I guess you're interested ...
4 years, 6 months ago (2016-06-15 17:44:09 UTC) #21
Peter Kasting
https://codereview.chromium.org/2047483003/diff/100001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/2047483003/diff/100001/chrome/app/generated_resources.grd#newcode11304 chrome/app/generated_resources.grd:11304: + <message name="IDS_COULDNT_OPEN_PROFILE_ERROR" desc="Error displayed on startup when the ...
4 years, 6 months ago (2016-06-16 06:37:50 UTC) #22
WC Leung
+Mike because he is a profile expert (hopefully back from O-O-O) Brett: Uploaded the tests. ...
4 years, 6 months ago (2016-06-19 17:56:19 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2047483003/180001
4 years, 6 months ago (2016-06-19 17:56:23 UTC) #27
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started by full ...
4 years, 6 months ago (2016-06-19 17:56:26 UTC) #29
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2047483003/180001
4 years, 6 months ago (2016-06-19 17:59:13 UTC) #31
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-19 18:53:52 UTC) #33
Mike Lerman
https://codereview.chromium.org/2047483003/diff/180001/chrome/browser/ui/startup/startup_browser_creator.cc File chrome/browser/ui/startup/startup_browser_creator.cc (right): https://codereview.chromium.org/2047483003/diff/180001/chrome/browser/ui/startup/startup_browser_creator.cc#newcode897 chrome/browser/ui/startup/startup_browser_creator.cc:897: // If we're using the --new-profile-management flag and this ...
4 years, 6 months ago (2016-06-20 01:09:36 UTC) #34
Peter Kasting
https://codereview.chromium.org/2047483003/diff/100001/chrome/browser/ui/startup/startup_browser_creator.h File chrome/browser/ui/startup/startup_browser_creator.h (right): https://codereview.chromium.org/2047483003/diff/100001/chrome/browser/ui/startup/startup_browser_creator.h#newcode185 chrome/browser/ui/startup/startup_browser_creator.h:185: // manager) if the above profile is signed out. ...
4 years, 6 months ago (2016-06-20 02:25:51 UTC) #35
WC Leung
https://codereview.chromium.org/2047483003/diff/100001/chrome/browser/ui/startup/startup_browser_creator.cc File chrome/browser/ui/startup/startup_browser_creator.cc (right): https://codereview.chromium.org/2047483003/diff/100001/chrome/browser/ui/startup/startup_browser_creator.cc#newcode932 chrome/browser/ui/startup/startup_browser_creator.cc:932: if (!has_entry || !entry->IsSigninRequired()) On 2016/06/19 17:56:19, WC Leung ...
4 years, 6 months ago (2016-06-20 15:44:24 UTC) #36
Mike Lerman
https://codereview.chromium.org/2047483003/diff/100001/chrome/browser/ui/startup/startup_browser_creator.cc File chrome/browser/ui/startup/startup_browser_creator.cc (right): https://codereview.chromium.org/2047483003/diff/100001/chrome/browser/ui/startup/startup_browser_creator.cc#newcode932 chrome/browser/ui/startup/startup_browser_creator.cc:932: if (!has_entry || !entry->IsSigninRequired()) On 2016/06/20 15:44:24, WC Leung ...
4 years, 6 months ago (2016-06-20 15:50:31 UTC) #37
Peter Kasting
I'm assuming you're still iterating with Mike and I should review after that, let me ...
4 years, 6 months ago (2016-06-22 02:25:35 UTC) #38
WC Leung
https://codereview.chromium.org/2047483003/diff/100001/chrome/browser/ui/startup/startup_browser_creator.cc File chrome/browser/ui/startup/startup_browser_creator.cc (right): https://codereview.chromium.org/2047483003/diff/100001/chrome/browser/ui/startup/startup_browser_creator.cc#newcode932 chrome/browser/ui/startup/startup_browser_creator.cc:932: if (!has_entry || !entry->IsSigninRequired()) On 2016/06/20 15:50:31, Mike Lerman ...
4 years, 6 months ago (2016-06-23 15:40:33 UTC) #39
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2047483003/200001
4 years, 6 months ago (2016-06-24 16:16:48 UTC) #41
WC Leung
Mike: added the case for |has_entry| being false. PTAL. BTW, one file has been modified ...
4 years, 6 months ago (2016-06-24 16:17:50 UTC) #42
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-24 17:21:57 UTC) #44
Mike Lerman
profiles changes and related behavior LGTM. I'll let pkasting@ come back in for the startup ...
4 years, 5 months ago (2016-06-27 19:08:01 UTC) #45
Peter Kasting
https://codereview.chromium.org/2047483003/diff/200001/base/test/test_file_util_win.cc File base/test/test_file_util_win.cc (right): https://codereview.chromium.org/2047483003/diff/200001/base/test/test_file_util_win.cc#newcode78 base/test/test_file_util_win.cc:78: // Deny |permission| on the file |path|, for the ...
4 years, 5 months ago (2016-07-01 00:53:24 UTC) #46
brettw
https://codereview.chromium.org/2047483003/diff/200001/chrome/browser/ui/startup/startup_browser_creator_corrupt_profiles_browsertest_win.cc File chrome/browser/ui/startup/startup_browser_creator_corrupt_profiles_browsertest_win.cc (right): https://codereview.chromium.org/2047483003/diff/200001/chrome/browser/ui/startup/startup_browser_creator_corrupt_profiles_browsertest_win.cc#newcode136 chrome/browser/ui/startup/startup_browser_creator_corrupt_profiles_browsertest_win.cc:136: return base::DenyFilePermission(user_data_dir, FILE_ADD_SUBDIRECTORY); I prefer WC's version to this. ...
4 years, 5 months ago (2016-07-01 22:21:53 UTC) #47
brettw
lgtm https://codereview.chromium.org/2047483003/diff/200001/chrome/browser/chrome_browser_main.cc File chrome/browser/chrome_browser_main.cc (right): https://codereview.chromium.org/2047483003/diff/200001/chrome/browser/chrome_browser_main.cc#newcode414 chrome/browser/chrome_browser_main.cc:414: profiles::IsMultipleProfilesEnabled() && This same condition is used near ...
4 years, 5 months ago (2016-07-01 23:13:22 UTC) #48
Peter Kasting
https://codereview.chromium.org/2047483003/diff/200001/chrome/browser/ui/startup/startup_browser_creator_corrupt_profiles_browsertest_win.cc File chrome/browser/ui/startup/startup_browser_creator_corrupt_profiles_browsertest_win.cc (right): https://codereview.chromium.org/2047483003/diff/200001/chrome/browser/ui/startup/startup_browser_creator_corrupt_profiles_browsertest_win.cc#newcode136 chrome/browser/ui/startup/startup_browser_creator_corrupt_profiles_browsertest_win.cc:136: return base::DenyFilePermission(user_data_dir, FILE_ADD_SUBDIRECTORY); On 2016/07/01 22:21:53, brettw (plz ping ...
4 years, 5 months ago (2016-07-02 00:15:43 UTC) #49
WC Leung
New patch uploaded. Peter Kasting: PTAL. Note that the code for base/test/* is in the ...
4 years, 5 months ago (2016-07-07 17:01:54 UTC) #51
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2047483003/240001
4 years, 5 months ago (2016-07-08 00:11:50 UTC) #53
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-07-08 01:22:16 UTC) #55
Peter Kasting
https://codereview.chromium.org/2047483003/diff/200001/base/test/test_file_util_win.cc File base/test/test_file_util_win.cc (right): https://codereview.chromium.org/2047483003/diff/200001/base/test/test_file_util_win.cc#newcode78 base/test/test_file_util_win.cc:78: // Deny |permission| on the file |path|, for the ...
4 years, 5 months ago (2016-07-11 02:58:59 UTC) #56
Mike Lerman
https://codereview.chromium.org/2047483003/diff/200001/chrome/browser/ui/startup/startup_browser_creator.cc File chrome/browser/ui/startup/startup_browser_creator.cc (right): https://codereview.chromium.org/2047483003/diff/200001/chrome/browser/ui/startup/startup_browser_creator.cc#newcode904 chrome/browser/ui/startup/startup_browser_creator.cc:904: auto& storage = profile_manager->GetProfileAttributesStorage(); On 2016/07/11 02:58:58, Peter Kasting ...
4 years, 5 months ago (2016-07-11 10:01:08 UTC) #57
WC Leung
New patch uploaded. Peter: PTAL. Paweł: Some code in base/test/* is copied from https://codereview.chromium.org/2061593002/ . ...
4 years, 5 months ago (2016-07-18 17:56:19 UTC) #59
WC Leung
New patch really uploaded. (Said "uploaded" yesterday, but sadly nothing was uploaded except for base/test/*.)
4 years, 5 months ago (2016-07-19 08:04:21 UTC) #60
Peter Kasting
LGTM https://codereview.chromium.org/2047483003/diff/200001/chrome/browser/ui/startup/startup_browser_creator.cc File chrome/browser/ui/startup/startup_browser_creator.cc (right): https://codereview.chromium.org/2047483003/diff/200001/chrome/browser/ui/startup/startup_browser_creator.cc#newcode950 chrome/browser/ui/startup/startup_browser_creator.cc:950: Profile* system_profile = On 2016/07/18 17:56:18, WC Leung ...
4 years, 5 months ago (2016-07-19 21:56:08 UTC) #61
Paweł Hajdan Jr.
LGTM
4 years, 5 months ago (2016-07-20 15:20:55 UTC) #62
WC Leung
Patches uploaded to address Peter's comments and fix the clang compile failure. Peter: PTAL. https://codereview.chromium.org/2047483003/diff/200001/chrome/browser/ui/startup/startup_browser_creator.cc ...
4 years, 4 months ago (2016-07-27 18:00:07 UTC) #66
Peter Kasting
LGTM https://codereview.chromium.org/2047483003/diff/360001/base/test/test_file_util.h File base/test/test_file_util.h (right): https://codereview.chromium.org/2047483003/diff/360001/base/test/test_file_util.h#newcode48 base/test/test_file_util.h:48: // ACCESS_MARK structure, and its possible values can ...
4 years, 4 months ago (2016-07-28 20:09:50 UTC) #77
WC Leung
Landing. Thanks everyone! https://codereview.chromium.org/2047483003/diff/360001/base/test/test_file_util.h File base/test/test_file_util.h (right): https://codereview.chromium.org/2047483003/diff/360001/base/test/test_file_util.h#newcode48 base/test/test_file_util.h:48: // ACCESS_MARK structure, and its possible ...
4 years, 4 months ago (2016-08-01 18:03:07 UTC) #82
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/2047483003/440001
4 years, 4 months ago (2016-08-01 18:03:44 UTC) #85
commit-bot: I haz the power
Committed patchset #19 (id:440001)
4 years, 4 months ago (2016-08-01 19:29:05 UTC) #87
commit-bot: I haz the power
4 years, 4 months ago (2016-08-01 19:32:00 UTC) #89
Message was sent while issue was closed.
Patchset 19 (id:??) landed as
https://crrev.com/2873496dd5bb12be052aa1c5a341637faade926d
Cr-Commit-Position: refs/heads/master@{#409023}

Powered by Google App Engine
This is Rietveld 408576698