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

Issue 2156373002: Fix restoring individual tabs from recently closed windows. (Closed)

Created:
4 years, 5 months ago by Sidney San Martín
Modified:
4 years, 5 months ago
Reviewers:
Robert Sesek
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix restoring individual tabs from recently closed windows. `sessions::TabRestoreService::Tab`s get new ids when they're copied (see the constructor at tab_restore_service.cc:40 — it delegates to the `Entry` constructor at tab_restore_service.cc:40, which assigns a unique id). As a quick fix, I'm avoiding the copy. I'm planning to refactor `sessions::TabRestoreService::Tab` and its consumers this week to get rid of this trap. BUG=585564 TEST=Close a window with multiple tabs. Try to restore one of them from the history menu. With this change, it should happen. Committed: https://crrev.com/c2aa85e42d6d85b15e46e82f2df516e2e896bd1b Cr-Commit-Position: refs/heads/master@{#406281}

Patch Set 1 #

Patch Set 2 : Testify! #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -6 lines) Patch
M chrome/browser/ui/cocoa/history_menu_bridge.mm View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/history_menu_bridge_unittest.mm View 1 4 chunks +13 lines, -4 lines 0 comments Download

Messages

Total messages: 19 (10 generated)
Sidney San Martín
rsesek@ — It might be good to add a test for this, which I've never ...
4 years, 5 months ago (2016-07-18 21:22:54 UTC) #5
Robert Sesek
I am a good reviewer for this (I wrote the code initially ;-). Wow that's ...
4 years, 5 months ago (2016-07-18 21:29:20 UTC) #7
Sidney San Martín
Cool, on it.
4 years, 5 months ago (2016-07-18 21:33:22 UTC) #8
Sidney San Martín
Adding tests (actually just tweaking an existing test to check the ids of tabs which ...
4 years, 5 months ago (2016-07-19 01:01:51 UTC) #11
Robert Sesek
LGTM
4 years, 5 months ago (2016-07-19 14:51:19 UTC) #12
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/2156373002/20001
4 years, 5 months ago (2016-07-19 15:02:34 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 5 months ago (2016-07-19 15:36:13 UTC) #16
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-19 15:36:27 UTC) #17
commit-bot: I haz the power
4 years, 5 months ago (2016-07-19 15:38:02 UTC) #19
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/c2aa85e42d6d85b15e46e82f2df516e2e896bd1b
Cr-Commit-Position: refs/heads/master@{#406281}

Powered by Google App Engine
This is Rietveld 408576698