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

Issue 672083002: Refactoring of SessionService to get componentized. (Closed)

Created:
6 years, 2 months ago by Mr4D (OOO till 08-26)
Modified:
6 years, 1 month ago
Reviewers:
sky
CC:
chromium-reviews, tim+watch_chromium.org, extensions-reviews_chromium.org, zea+watch_chromium.org, pvalenzuela+watch_chromium.org, marja+watch_chromium.org, chromium-apps-reviews_chromium.org, maniscalco+watch_chromium.org, marja
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Refactoring of SessionService into a component part 3. This CL breaks out the command handling (command creation and session information restore) from |SessionService| into |SessionServiceCommands|, which does have no dependencies on Browser or Content. Furthermore it breaks out the command handling from |BaseSessionService| into |BaseSessionServiceCommands|. This way the |PersistentTabRestoreService| and the |SessionService| can keep using the base command set which is used by both users. BUG=424679 TEST=covered by existing tests Committed: https://crrev.com/c3aa8cf571c5d0ed92725a15d0cd2c54f7da3b05 Cr-Commit-Position: refs/heads/master@{#302041}

Patch Set 1 #

Total comments: 3

Patch Set 2 : First version #

Total comments: 9

Patch Set 3 : Addressed #

Patch Set 4 : Found a few nits #

Patch Set 5 : One more self nit #

Total comments: 2

Patch Set 6 : Switched back to #2 and addressed points #

Total comments: 20

Patch Set 7 : Addressed #

Total comments: 2

Patch Set 8 : . #

Total comments: 9

Patch Set 9 : . #

Patch Set 10 : Added missing files. #

Total comments: 4

Patch Set 11 : More shuffling #

Total comments: 4

Patch Set 12 : . #

Patch Set 13 : Fixing windows compile problem #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1374 lines, -1254 lines) Patch
M chrome/browser/extensions/api/sessions/sessions_api.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/sessions/base_session_service.h View 1 3 4 5 2 chunks +0 lines, -60 lines 0 comments Download
M chrome/browser/sessions/base_session_service.cc View 1 3 4 5 2 chunks +0 lines, -142 lines 0 comments Download
A chrome/browser/sessions/base_session_service_commands.h View 1 2 3 4 5 6 1 chunk +74 lines, -0 lines 0 comments Download
A chrome/browser/sessions/base_session_service_commands.cc View 1 2 3 4 5 1 chunk +151 lines, -0 lines 0 comments Download
M chrome/browser/sessions/persistent_tab_restore_service.cc View 1 2 3 4 5 6 6 chunks +23 lines, -17 lines 0 comments Download
M chrome/browser/sessions/persistent_tab_restore_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/sessions/session_restore.cc View 1 2 3 4 5 6 5 chunks +7 lines, -6 lines 0 comments Download
M chrome/browser/sessions/session_service.h View 1 2 3 4 5 6 7 8 9 10 12 chunks +30 lines, -144 lines 0 comments Download
M chrome/browser/sessions/session_service.cc View 1 2 3 4 5 6 7 8 9 10 11 21 chunks +77 lines, -841 lines 0 comments Download
A chrome/browser/sessions/session_service_commands.h View 1 2 3 4 5 6 7 1 chunk +84 lines, -0 lines 0 comments Download
A chrome/browser/sessions/session_service_commands.cc View 1 2 3 4 5 6 7 1 chunk +824 lines, -0 lines 0 comments Download
M chrome/browser/sessions/session_service_test_helper.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/sessions/session_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 chunks +26 lines, -25 lines 0 comments Download
A chrome/browser/sessions/session_service_utils.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +15 lines, -0 lines 0 comments Download
A chrome/browser/sessions/session_service_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +27 lines, -0 lines 0 comments Download
M chrome/browser/sessions/session_types.h View 1 2 3 4 5 6 7 8 2 chunks +10 lines, -4 lines 0 comments Download
M chrome/browser/sessions/session_types.cc View 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/sync/glue/session_sync_test_helper.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/sessions/sessions_sync_manager.cc View 1 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/sync/sessions/sessions_sync_manager_unittest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (3 generated)
Mr4D (OOO till 08-26)
As discussed this morning: This is not ready yet. The idea: Pull the browser/content independent ...
6 years, 2 months ago (2014-10-23 01:03:42 UTC) #2
sky
The session service code has the following distinct parts: 1. Queues up commands, pushing them ...
6 years, 2 months ago (2014-10-23 13:20:53 UTC) #3
Mr4D (OOO till 08-26)
That was roughly what I have meant with option b. Okay - as I mentioned ...
6 years, 2 months ago (2014-10-23 16:07:30 UTC) #4
sky
On 2014/10/23 16:07:30, Mr4D wrote: > That was roughly what I have meant with option ...
6 years, 2 months ago (2014-10-23 17:11:36 UTC) #5
Mr4D (OOO till 08-26)
I have found a way to make us both happy :). The patch is now ...
6 years, 2 months ago (2014-10-23 20:09:11 UTC) #6
sky
https://codereview.chromium.org/672083002/diff/20001/chrome/browser/sessions/base_session_service_commands.h File chrome/browser/sessions/base_session_service_commands.h (right): https://codereview.chromium.org/672083002/diff/20001/chrome/browser/sessions/base_session_service_commands.h#newcode20 chrome/browser/sessions/base_session_service_commands.h:20: class BaseSessionServiceCommands { None of these functions need any ...
6 years, 2 months ago (2014-10-23 21:51:50 UTC) #7
Mr4D (OOO till 08-26)
Took me some time to address - but here you go! Please have another look! ...
6 years, 1 month ago (2014-10-27 22:26:35 UTC) #8
sky
Ugh, this is too gargantuan to review. Can you split this out into multiple patches. ...
6 years, 1 month ago (2014-10-27 23:49:35 UTC) #9
Mr4D (OOO till 08-26)
As discussed - here is now a version #2 + addressing your basic concerns. I ...
6 years, 1 month ago (2014-10-28 21:45:38 UTC) #10
sky
https://codereview.chromium.org/672083002/diff/100001/chrome/browser/sessions/base_session_service_commands.h File chrome/browser/sessions/base_session_service_commands.h (right): https://codereview.chromium.org/672083002/diff/100001/chrome/browser/sessions/base_session_service_commands.h#newcode20 chrome/browser/sessions/base_session_service_commands.h:20: Add a TODO to convert to returning scoped_ptr and ...
6 years, 1 month ago (2014-10-28 22:52:38 UTC) #11
Mr4D (OOO till 08-26)
Addressed! Please have another look! https://codereview.chromium.org/672083002/diff/100001/chrome/browser/sessions/base_session_service_commands.h File chrome/browser/sessions/base_session_service_commands.h (right): https://codereview.chromium.org/672083002/diff/100001/chrome/browser/sessions/base_session_service_commands.h#newcode20 chrome/browser/sessions/base_session_service_commands.h:20: On 2014/10/28 22:52:38, sky ...
6 years, 1 month ago (2014-10-29 02:04:13 UTC) #12
sky
https://codereview.chromium.org/672083002/diff/100001/chrome/browser/sessions/session_service.cc File chrome/browser/sessions/session_service.cc (right): https://codereview.chromium.org/672083002/diff/100001/chrome/browser/sessions/session_service.cc#newcode128 chrome/browser/sessions/session_service.cc:128: default: On 2014/10/29 02:04:13, Mr4D wrote: > Actually that's ...
6 years, 1 month ago (2014-10-29 15:44:21 UTC) #13
Mr4D (OOO till 08-26)
Done. Please have another look. https://codereview.chromium.org/672083002/diff/100001/chrome/browser/sessions/session_service.cc File chrome/browser/sessions/session_service.cc (right): https://codereview.chromium.org/672083002/diff/100001/chrome/browser/sessions/session_service.cc#newcode128 chrome/browser/sessions/session_service.cc:128: default: On 2014/10/29 15:44:20, ...
6 years, 1 month ago (2014-10-29 19:35:30 UTC) #14
sky
https://codereview.chromium.org/672083002/diff/100001/chrome/browser/sessions/session_service_commands.h File chrome/browser/sessions/session_service_commands.h (right): https://codereview.chromium.org/672083002/diff/100001/chrome/browser/sessions/session_service_commands.h#newcode63 chrome/browser/sessions/session_service_commands.h:63: SessionCommand* CreateSetTabWindowCommand(const SessionID& window_id, On 2014/10/29 19:35:30, Mr4D wrote: ...
6 years, 1 month ago (2014-10-29 20:49:15 UTC) #15
Mr4D (OOO till 08-26)
Please have another look! https://codereview.chromium.org/672083002/diff/140001/chrome/browser/sessions/session_service.cc File chrome/browser/sessions/session_service.cc (right): https://codereview.chromium.org/672083002/diff/140001/chrome/browser/sessions/session_service.cc#newcode284 chrome/browser/sessions/session_service.cc:284: if (!ShouldRestoreWindowOfType(window_type, app_type)) In SessionServiceUtils. ...
6 years, 1 month ago (2014-10-29 22:22:18 UTC) #16
sky
https://codereview.chromium.org/672083002/diff/140001/chrome/browser/sessions/session_service.cc File chrome/browser/sessions/session_service.cc (right): https://codereview.chromium.org/672083002/diff/140001/chrome/browser/sessions/session_service.cc#newcode284 chrome/browser/sessions/session_service.cc:284: if (!ShouldRestoreWindowOfType(window_type, app_type)) On 2014/10/29 22:22:17, Mr4D wrote: > ...
6 years, 1 month ago (2014-10-29 23:00:37 UTC) #17
Mr4D (OOO till 08-26)
Doh! Added.
6 years, 1 month ago (2014-10-29 23:06:33 UTC) #18
sky
https://codereview.chromium.org/672083002/diff/180001/chrome/browser/sessions/session_service_utils.cc File chrome/browser/sessions/session_service_utils.cc (right): https://codereview.chromium.org/672083002/diff/180001/chrome/browser/sessions/session_service_utils.cc#newcode7 chrome/browser/sessions/session_service_utils.cc:7: bool ShouldRestoreWindowOfType(SessionWindow::WindowType window_type, AFAICT the ShouldRestore/RemoveUnusedRestoreWindows is only used ...
6 years, 1 month ago (2014-10-29 23:14:51 UTC) #19
Mr4D (OOO till 08-26)
Please have another look https://codereview.chromium.org/672083002/diff/180001/chrome/browser/sessions/session_service_utils.cc File chrome/browser/sessions/session_service_utils.cc (right): https://codereview.chromium.org/672083002/diff/180001/chrome/browser/sessions/session_service_utils.cc#newcode7 chrome/browser/sessions/session_service_utils.cc:7: bool ShouldRestoreWindowOfType(SessionWindow::WindowType window_type, On 2014/10/29 ...
6 years, 1 month ago (2014-10-29 23:47:44 UTC) #20
sky
https://codereview.chromium.org/672083002/diff/200001/chrome/browser/sessions/session_service.cc File chrome/browser/sessions/session_service.cc (right): https://codereview.chromium.org/672083002/diff/200001/chrome/browser/sessions/session_service.cc#newcode465 chrome/browser/sessions/session_service.cc:465: while (i != window_list->end()) { You never increment i ...
6 years, 1 month ago (2014-10-29 23:58:03 UTC) #21
Mr4D (OOO till 08-26)
Please have another look https://codereview.chromium.org/672083002/diff/200001/chrome/browser/sessions/session_service.cc File chrome/browser/sessions/session_service.cc (right): https://codereview.chromium.org/672083002/diff/200001/chrome/browser/sessions/session_service.cc#newcode465 chrome/browser/sessions/session_service.cc:465: while (i != window_list->end()) { ...
6 years, 1 month ago (2014-10-30 00:04:25 UTC) #22
sky
LGTM
6 years, 1 month ago (2014-10-30 03:25:41 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/672083002/220001
6 years, 1 month ago (2014-10-30 04:54:44 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/672083002/240001
6 years, 1 month ago (2014-10-30 05:14:20 UTC) #27
commit-bot: I haz the power
Committed patchset #13 (id:240001)
6 years, 1 month ago (2014-10-30 06:02:54 UTC) #28
commit-bot: I haz the power
6 years, 1 month ago (2014-10-30 06:03:32 UTC) #29
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/c3aa8cf571c5d0ed92725a15d0cd2c54f7da3b05
Cr-Commit-Position: refs/heads/master@{#302041}

Powered by Google App Engine
This is Rietveld 408576698