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

Issue 2345763002: Fix tabs duplication when restoring last closed window. (Closed)

Created:
4 years, 3 months ago by Michael K. (Yandex Team)
Modified:
4 years, 3 months ago
Reviewers:
sky
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix tabs duplication when restoring last closed window. Restoration of a last closed window is done by TabRestoreService. However if that window is going to be the first window for a profile, SessionService will perform restoration and there will be conflict between services. It leads to tabs duplication. BUG=500083 R=sky@chromium.org Committed: https://crrev.com/d19beb53ae69324f842ba8efdbdd0967034f38c4 Cr-Commit-Position: refs/heads/master@{#420006}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Fix tabs duplication, refactoring. #

Total comments: 6

Patch Set 3 : Fix comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+60 lines, -1 line) Patch
M chrome/browser/sessions/session_service.cc View 1 3 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/sessions/tab_restore_browsertest.cc View 1 2 2 chunks +36 lines, -0 lines 0 comments Download
M components/sessions/core/in_memory_tab_restore_service.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M components/sessions/core/in_memory_tab_restore_service.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M components/sessions/core/persistent_tab_restore_service.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M components/sessions/core/persistent_tab_restore_service.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M components/sessions/core/tab_restore_service.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M components/sessions/core/tab_restore_service_helper.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M components/sessions/core/tab_restore_service_helper.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (3 generated)
Michael K. (Yandex Team)
4 years, 3 months ago (2016-09-15 18:42:08 UTC) #1
Michael K. (Yandex Team)
On 2016/09/15 18:42:08, mkolom wrote: PTAL
4 years, 3 months ago (2016-09-15 18:46:21 UTC) #2
Michael K. (Yandex Team)
(btw I have another variant to fix it: via chrome/browser/app_controller_mac.h/mm; It's similar to how chrome::NewEmptyWindow ...
4 years, 3 months ago (2016-09-15 18:56:27 UTC) #3
Michael K. (Yandex Team)
(btw I have another variant to fix it: via chrome/browser/app_controller_mac.h/mm; It's similar to how chrome::NewEmptyWindow ...
4 years, 3 months ago (2016-09-15 18:56:28 UTC) #4
Michael K. (Yandex Team)
(btw I have another variant to fix it: via chrome/browser/app_controller_mac.h/mm; It's similar to how chrome::NewEmptyWindow ...
4 years, 3 months ago (2016-09-15 18:56:30 UTC) #5
sky
Thanks for the fix! Adding the extra boolean to restore is confusing and easy to ...
4 years, 3 months ago (2016-09-16 17:03:23 UTC) #6
Michael K. (Yandex Team)
Ok. I'll add setter to SessionService. And browser_live_tab_context.cc will use that setter. TabRestoreService won't know ...
4 years, 3 months ago (2016-09-16 17:17:59 UTC) #7
sky
I think you're going down the path of a setter on SessionService, which is still ...
4 years, 3 months ago (2016-09-16 17:21:03 UTC) #8
Michael K. (Yandex Team)
Sky, I've fixed some of your notes. Sorry but I can't understand what setter and ...
4 years, 3 months ago (2016-09-20 04:29:15 UTC) #9
sky
https://codereview.chromium.org/2345763002/diff/20001/chrome/browser/sessions/session_service.cc File chrome/browser/sessions/session_service.cc (right): https://codereview.chromium.org/2345763002/diff/20001/chrome/browser/sessions/session_service.cc#newcode596 chrome/browser/sessions/session_service.cc:596: (!tab_restore_service || !tab_restore_service->IsRestoring())) { The problem with this is ...
4 years, 3 months ago (2016-09-20 13:18:37 UTC) #10
Michael K. (Yandex Team)
https://codereview.chromium.org/2345763002/diff/1/chrome/browser/sessions/tab_restore_browsertest.cc File chrome/browser/sessions/tab_restore_browsertest.cc (right): https://codereview.chromium.org/2345763002/diff/1/chrome/browser/sessions/tab_restore_browsertest.cc#newcode753 chrome/browser/sessions/tab_restore_browsertest.cc:753: EXPECT_EQ(4, browser->tab_strip_model()->count()); Without that fix there will be 8 ...
4 years, 3 months ago (2016-09-20 14:53:58 UTC) #11
sky
In theory tab restore shouldn't restore things out of order, so lets go with your ...
4 years, 3 months ago (2016-09-20 16:47:46 UTC) #12
Michael K. (Yandex Team)
https://codereview.chromium.org/2345763002/diff/20001/chrome/browser/sessions/tab_restore_browsertest.cc File chrome/browser/sessions/tab_restore_browsertest.cc (right): https://codereview.chromium.org/2345763002/diff/20001/chrome/browser/sessions/tab_restore_browsertest.cc#newcode724 chrome/browser/sessions/tab_restore_browsertest.cc:724: // Check that TabRestoreService and SessionService do not conflict ...
4 years, 3 months ago (2016-09-21 06:36:40 UTC) #13
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/2345763002/40001
4 years, 3 months ago (2016-09-21 06:37:24 UTC) #16
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 3 months ago (2016-09-21 08:10:56 UTC) #17
commit-bot: I haz the power
4 years, 3 months ago (2016-09-21 08:12:31 UTC) #19
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/d19beb53ae69324f842ba8efdbdd0967034f38c4
Cr-Commit-Position: refs/heads/master@{#420006}

Powered by Google App Engine
This is Rietveld 408576698