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

Issue 2714483003: cros: Fix restoring session windows after crash inconsistent minimized window counts (Closed)

Created:
3 years, 10 months ago by Qiang(Joe) Xu
Modified:
3 years, 9 months ago
Reviewers:
sky
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cros: Fix restoring session windows after crash inconsistent minimized window counts Changes: Close the startup browser after closing the crash bubble view and then do session restore. BUG=694854 TEST=emulator tests and device test saw bug fixed; also test coverage is added.

Patch Set 1 #

Total comments: 2

Patch Set 2 : based on ps1's comments #

Total comments: 2

Patch Set 3 : swap the first session window #

Patch Set 4 : SetInitialFocus when active #

Total comments: 2

Patch Set 5 : based on ps4's comments #

Total comments: 2

Patch Set 6 : do not reorder #

Patch Set 7 : fix error in above patch #

Patch Set 8 : improved comments #

Total comments: 6

Patch Set 9 : RestoreSessionAfterCrash on nullptr #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -8 lines) Patch
M chrome/browser/sessions/session_restore.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/sessions/session_restore_browsertest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/sessions/session_restore_browsertest_chromeos.cc View 1 2 3 4 5 6 7 8 3 chunks +57 lines, -1 line 0 comments Download
M chrome/browser/ui/views/session_crashed_bubble_view.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 61 (43 generated)
Qiang(Joe) Xu
Hi sky@, ptal thanks!
3 years, 10 months ago (2017-02-23 01:44:56 UTC) #6
sky
https://codereview.chromium.org/2714483003/diff/1/chrome/browser/sessions/session_restore.cc File chrome/browser/sessions/session_restore.cc (right): https://codereview.chromium.org/2714483003/diff/1/chrome/browser/sessions/session_restore.cc#newcode641 chrome/browser/sessions/session_restore.cc:641: params.initial_show_state = show_state; The show state is plumbed through ...
3 years, 10 months ago (2017-02-23 03:37:37 UTC) #9
Qiang(Joe) Xu
Hi sky@, updated, ptal. https://codereview.chromium.org/2714483003/diff/1/chrome/browser/sessions/session_restore.cc File chrome/browser/sessions/session_restore.cc (right): https://codereview.chromium.org/2714483003/diff/1/chrome/browser/sessions/session_restore.cc#newcode641 chrome/browser/sessions/session_restore.cc:641: params.initial_show_state = show_state; On 2017/02/23 ...
3 years, 10 months ago (2017-02-23 20:53:14 UTC) #15
sky
https://codereview.chromium.org/2714483003/diff/20001/chrome/browser/sessions/session_restore.cc File chrome/browser/sessions/session_restore.cc (right): https://codereview.chromium.org/2714483003/diff/20001/chrome/browser/sessions/session_restore.cc#newcode415 chrome/browser/sessions/session_restore.cc:415: if ((*i)->show_state == ui::SHOW_STATE_MINIMIZED) If there is only one ...
3 years, 10 months ago (2017-02-23 21:41:06 UTC) #16
Qiang(Joe) Xu
Hi sky@, ptal, thanks! https://codereview.chromium.org/2714483003/diff/20001/chrome/browser/sessions/session_restore.cc File chrome/browser/sessions/session_restore.cc (right): https://codereview.chromium.org/2714483003/diff/20001/chrome/browser/sessions/session_restore.cc#newcode415 chrome/browser/sessions/session_restore.cc:415: if ((*i)->show_state == ui::SHOW_STATE_MINIMIZED) On ...
3 years, 9 months ago (2017-03-06 22:36:03 UTC) #32
sky
When you say 'fail on device.' Can you be more specific? What fails? -Scott On ...
3 years, 9 months ago (2017-03-07 00:05:42 UTC) #36
Qiang(Joe) Xu
On 2017/03/07 00:05:42, sky wrote: > When you say 'fail on device.' Can you be ...
3 years, 9 months ago (2017-03-07 00:39:35 UTC) #40
sky
https://codereview.chromium.org/2714483003/diff/100001/chrome/browser/sessions/session_restore.cc File chrome/browser/sessions/session_restore.cc (right): https://codereview.chromium.org/2714483003/diff/100001/chrome/browser/sessions/session_restore.cc#newcode418 chrome/browser/sessions/session_restore.cc:418: for (auto j = windows->begin(); j != windows->end(); ++j) ...
3 years, 9 months ago (2017-03-07 01:05:36 UTC) #41
Qiang(Joe) Xu
Hi sky@, ptal, thanks! https://codereview.chromium.org/2714483003/diff/100001/chrome/browser/sessions/session_restore.cc File chrome/browser/sessions/session_restore.cc (right): https://codereview.chromium.org/2714483003/diff/100001/chrome/browser/sessions/session_restore.cc#newcode418 chrome/browser/sessions/session_restore.cc:418: for (auto j = windows->begin(); ...
3 years, 9 months ago (2017-03-07 01:19:31 UTC) #42
sky
https://codereview.chromium.org/2714483003/diff/120001/chrome/browser/sessions/session_restore.cc File chrome/browser/sessions/session_restore.cc (right): https://codereview.chromium.org/2714483003/diff/120001/chrome/browser/sessions/session_restore.cc#newcode402 chrome/browser/sessions/session_restore.cc:402: // Always move the session window with |active_window_id| to ...
3 years, 9 months ago (2017-03-07 17:34:19 UTC) #43
Qiang(Joe) Xu
Hi sky@, ptal, thanks! https://codereview.chromium.org/2714483003/diff/120001/chrome/browser/sessions/session_restore.cc File chrome/browser/sessions/session_restore.cc (right): https://codereview.chromium.org/2714483003/diff/120001/chrome/browser/sessions/session_restore.cc#newcode402 chrome/browser/sessions/session_restore.cc:402: // Always move the session ...
3 years, 9 months ago (2017-03-07 21:17:04 UTC) #49
sky
Before you continue with this look at the comment I have here: "I think you ...
3 years, 9 months ago (2017-03-07 22:41:33 UTC) #50
Qiang(Joe) Xu
https://codereview.chromium.org/2714483003/diff/180001/chrome/browser/sessions/session_restore.cc File chrome/browser/sessions/session_restore.cc (right): https://codereview.chromium.org/2714483003/diff/180001/chrome/browser/sessions/session_restore.cc#newcode416 chrome/browser/sessions/session_restore.cc:416: active_window_on_existing_browser = true; On 2017/03/07 22:41:33, sky wrote: > ...
3 years, 9 months ago (2017-03-08 04:59:38 UTC) #51
sky
On 2017/03/08 04:59:38, Qiang(Joe) Xu wrote: > https://codereview.chromium.org/2714483003/diff/180001/chrome/browser/sessions/session_restore.cc > File chrome/browser/sessions/session_restore.cc (right): > > https://codereview.chromium.org/2714483003/diff/180001/chrome/browser/sessions/session_restore.cc#newcode416 ...
3 years, 9 months ago (2017-03-08 05:31:57 UTC) #52
Qiang(Joe) Xu
On 2017/03/08 05:31:57, sky wrote: > On 2017/03/08 04:59:38, Qiang(Joe) Xu wrote: > > > ...
3 years, 9 months ago (2017-03-09 17:20:31 UTC) #58
sky
That sounds like a jarring experience. Please correct me if I'm wrong, AFAICT here are ...
3 years, 9 months ago (2017-03-09 20:51:01 UTC) #59
Qiang(Joe) Xu
On 2017/03/09 20:51:01, sky wrote: > That sounds like a jarring experience. Please correct me ...
3 years, 9 months ago (2017-03-09 21:51:16 UTC) #60
sky
3 years, 9 months ago (2017-03-09 21:52:28 UTC) #61
Yes please. Close as will not fix. Sorry I didn't realize this earlier.

On Thu, Mar 9, 2017 at 1:51 PM,  <warx@chromium.org> wrote:
> On 2017/03/09 20:51:01, sky wrote:
>> That sounds like a jarring experience. Please correct me if I'm wrong,
>> AFAICT here are the steps from the bug:
>>
>> two windows, A and B with A minimized
>> crash
>> restart chrome
>> new window comes up, click restore button.
>>
>> In this case I would expect the window you clicked the restore button
>> on to contain the contents of what was in A and because the window was
>> already visible I wouldn't expect it to close or to minimize. In other
>> words I don't think this is a bug. Am I missing something?
>>
>> -Scott
>>
>> On Thu, Mar 9, 2017 at 9:20 AM, <mailto:warx@chromium.org> wrote:
>> > On 2017/03/08 05:31:57, sky wrote:
>> >> On 2017/03/08 04:59:38, Qiang(Joe) Xu wrote:
>> >> >
>> >>
>> >
>>
>
https://codereview.chromium.org/2714483003/diff/180001/chrome/browser/session...
>> >> > File chrome/browser/sessions/session_restore.cc (right):
>> >> >
>> >> >
>> >>
>> >
>>
>
https://codereview.chromium.org/2714483003/diff/180001/chrome/browser/session...
>> >> > chrome/browser/sessions/session_restore.cc:416:
>> >> > active_window_on_existing_browser = true;
>> >> > On 2017/03/07 22:41:33, sky wrote:
>> >> > > I think you should only do this logic if the browser window is not
>> > visible.
>> >> > > Otherwise you're changing the order that I mentioned previously.
>> >> > > What
>> > state
>> >> is
>> >> > > the browser's window in when you get here?
>> >> >
>> >> > I checked the visibility of |browser_|'s native window, it is
>> >> > visible. I
>> > think
>> >> > this makes sense since |browser_| is already opened and active before
>> > session
>> >> > restore starts in the reporter's case.
>> >> >
>> >> > hmm, I am a little out of solution right now. I will firstly send
>> >> > this
>> > comment
>> >> > back, and see if I can figure out another solution later.
>> >>
>> >> I suspect the right fix is that we should not be creating a browser
>> >> during
>> >> startup if session restore is enabled. Instead session restore should
>> >> take
>> > care
>> >> of creating the browser. This way session restore can be sure the first
>> > browser
>> >> is created in the right state.
>> >
>> > I think we must create a startup browser in this case, since user can
>> > interact
>> > with crash bubble, either choose restore session or dismiss it.
>> > The new patch introduces a new solution, "Close the startup browser
>> > after
>> > closing the crash bubble view and then do session restore." What do you
>> > think?
>> > Thanks!
>> >
>> > https://codereview.chromium.org/2714483003/
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Chromium-reviews" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
> email
>> to mailto:chromium-reviews+unsubscribe@chromium.org.
>>
>
> That is exactly what is happening as you said. But visually, it will make
> one
> more window unminimized.
> I am also inclined to agree this can be a WontFix. If we both agree with
> this,
> let me close this issue and comment on the bug then.
>
> https://codereview.chromium.org/2714483003/

-- 
You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698