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

Issue 21022018: Sessions API - previously Session Restore API. Supports restoring currently open foreign windows an… (Closed)

Created:
7 years, 4 months ago by Kristen Dwan
Modified:
7 years, 4 months ago
CC:
chromium-reviews, tim+watch_chromium.org, extensions-reviews_chromium.org, haitaol+watch_chromium.org, marja+watch_chromium.org, chromium-apps-reviews_chromium.org, rsimha+watch_chromium.org
Visibility:
Public.

Description

Sessions API - previously Session Restore API. Supports restoring currently open foreign windows and tabs. API proposal accessible at go/sessions-apidoc. SyncedDevices / DeviceInfo still needs to be added in once they are written and checked in by chrome.syncedDevices developer. Session name is currently holding the place of DeviceInfo in "info" component of Session object (sessions.json). An "on change" event listener for changes in device sync needs to be added as well. BUG=123266 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=219066 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=219187

Patch Set 1 #

Patch Set 2 : Added assert true to test #

Total comments: 24

Patch Set 3 : Split up codereview #

Patch Set 4 : Set similarity #

Total comments: 62

Patch Set 5 : updated #

Total comments: 64

Patch Set 6 : #

Total comments: 51

Patch Set 7 : #

Total comments: 17

Patch Set 8 : upload fail #

Patch Set 9 : sync #

Total comments: 2

Patch Set 10 : final #

Patch Set 11 : extension function histogram.. #

Patch Set 12 : test #

Patch Set 13 : clear #

Patch Set 14 : delete test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1372 lines, -864 lines) Patch
D chrome/browser/extensions/api/session_restore/OWNERS View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
D chrome/browser/extensions/api/session_restore/session_restore_api.h View 1 chunk +0 lines, -61 lines 0 comments Download
D chrome/browser/extensions/api/session_restore/session_restore_api.cc View 1 chunk +0 lines, -239 lines 0 comments Download
D chrome/browser/extensions/api/session_restore/session_restore_apitest.cc View 1 2 3 4 1 chunk +0 lines, -24 lines 0 comments Download
A + chrome/browser/extensions/api/sessions/OWNERS View 1 2 3 4 5 6 7 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/browser/extensions/api/sessions/session_id.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +53 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/sessions/session_id.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +49 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/sessions/sessions_api.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +102 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/sessions/sessions_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +593 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/sessions/sessions_apitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +283 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_api.cc View 1 2 3 4 5 6 7 8 6 chunks +10 lines, -36 lines 0 comments Download
A chrome/browser/extensions/api/tabs/windows_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +24 lines, -0 lines 0 comments Download
A chrome/browser/extensions/api/tabs/windows_util.cc View 1 2 3 4 5 1 chunk +48 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_function_histogram_value.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/profile_sync_service.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_service_mock.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 3 4 5 6 7 2 chunks +6 lines, -2 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -1 line 0 comments Download
M chrome/common/extensions/api/PRESUBMIT.py View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download
M chrome/common/extensions/api/_api_features.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/common/extensions/api/_permission_features.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/api/api.gyp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
D chrome/common/extensions/api/session_restore.json View 1 chunk +0 lines, -69 lines 0 comments Download
A chrome/common/extensions/api/sessions.json View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +117 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/tabs.json View 1 2 3 4 5 6 7 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/common/extensions/api/windows.json View 1 2 3 4 5 6 7 1 chunk +9 lines, -8 lines 0 comments Download
D chrome/common/extensions/docs/templates/public/extensions/sessionRestore.html View 1 chunk +0 lines, -1 line 0 comments Download
A chrome/common/extensions/docs/templates/public/extensions/sessions.html View 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/permissions/api_permission.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/permissions/chrome_api_permissions.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/permissions/permission_set_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
D chrome/test/data/extensions/api_test/session_restore/a.html View 1 chunk +0 lines, -7 lines 0 comments Download
D chrome/test/data/extensions/api_test/session_restore/b.html View 1 chunk +0 lines, -7 lines 0 comments Download
D chrome/test/data/extensions/api_test/session_restore/c.html View 1 chunk +0 lines, -7 lines 0 comments Download
D chrome/test/data/extensions/api_test/session_restore/d.html View 1 chunk +0 lines, -7 lines 0 comments Download
D chrome/test/data/extensions/api_test/session_restore/e.html View 1 chunk +0 lines, -7 lines 0 comments Download
D chrome/test/data/extensions/api_test/session_restore/manifest.json View 1 chunk +0 lines, -7 lines 0 comments Download
D chrome/test/data/extensions/api_test/session_restore/session_restore.html View 1 chunk +0 lines, -6 lines 0 comments Download
D chrome/test/data/extensions/api_test/session_restore/session_restore.js View 1 chunk +0 lines, -317 lines 0 comments Download
A + chrome/test/data/extensions/api_test/sessions/a.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/api_test/sessions/b.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/api_test/sessions/c.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/api_test/sessions/d.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/api_test/sessions/e.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/test/data/extensions/api_test/sessions/manifest.json View 4 5 6 7 8 9 10 11 12 1 chunk +7 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/sessions/sessions.html View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +6 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/api_test/sessions/sessions.js View 1 2 3 4 5 6 7 8 9 14 chunks +46 lines, -48 lines 0 comments Download

Messages

Total messages: 31 (0 generated)
Kristen Dwan
Sorry all for the lengthy review ... couldn't come up with a straight forward way ...
7 years, 4 months ago (2013-07-31 19:46:16 UTC) #1
not at google - send to devlin
https://codereview.chromium.org/21022018/diff/4001/chrome/browser/extensions/api/sessions/sessions_api.h File chrome/browser/extensions/api/sessions/sessions_api.h (right): https://codereview.chromium.org/21022018/diff/4001/chrome/browser/extensions/api/sessions/sessions_api.h#newcode3 chrome/browser/extensions/api/sessions/sessions_api.h:3: // found in the LICENSE file. could you make ...
7 years, 4 months ago (2013-07-31 22:54:22 UTC) #2
sky
two meta comments for you: if you can, split this review into chunks. Generally smaller ...
7 years, 4 months ago (2013-07-31 23:58:58 UTC) #3
sky
How about some test coverage here too? https://codereview.chromium.org/21022018/diff/4001/chrome/browser/sessions/persistent_tab_restore_service.h File chrome/browser/sessions/persistent_tab_restore_service.h (right): https://codereview.chromium.org/21022018/diff/4001/chrome/browser/sessions/persistent_tab_restore_service.h#newcode34 chrome/browser/sessions/persistent_tab_restore_service.h:34: // Returns ...
7 years, 4 months ago (2013-08-01 00:05:42 UTC) #4
Kristen Dwan
moved session code returning webcontents to its own cl to break it down a bit. ...
7 years, 4 months ago (2013-08-02 20:54:19 UTC) #5
not at google - send to devlin
https://codereview.chromium.org/21022018/diff/4001/chrome/common/extensions/api/windows.json File chrome/common/extensions/api/windows.json (right): https://codereview.chromium.org/21022018/diff/4001/chrome/common/extensions/api/windows.json#newcode34 chrome/common/extensions/api/windows.json:34: "description": "The state of this browser window. Under some ...
7 years, 4 months ago (2013-08-06 17:22:44 UTC) #6
not at google - send to devlin
https://codereview.chromium.org/21022018/diff/24001/chrome/browser/extensions/api/sessions/sessions_api.cc File chrome/browser/extensions/api/sessions/sessions_api.cc (right): https://codereview.chromium.org/21022018/diff/24001/chrome/browser/extensions/api/sessions/sessions_api.cc#newcode56 chrome/browser/extensions/api/sessions/sessions_api.cc:56: } Rather than sharing a magic variable (kForeignIdSeparator) and ...
7 years, 4 months ago (2013-08-06 19:04:09 UTC) #7
Kristen Dwan
main conclusion i think with session sync not enabled - in GetDevices, it should not ...
7 years, 4 months ago (2013-08-12 15:11:30 UTC) #8
Kristen Dwan
also - i added windows_helper.h and foreign_session_id.h -- the low similarity decided to detect those ...
7 years, 4 months ago (2013-08-12 15:14:54 UTC) #9
not at google - send to devlin
https://codereview.chromium.org/21022018/diff/24001/chrome/browser/extensions/api/sessions/sessions_api.cc File chrome/browser/extensions/api/sessions/sessions_api.cc (right): https://codereview.chromium.org/21022018/diff/24001/chrome/browser/extensions/api/sessions/sessions_api.cc#newcode339 chrome/browser/extensions/api/sessions/sessions_api.cc:339: SetError(kSessionsSyncNotEnabledError); On 2013/08/12 15:11:30, Kristen Dwan wrote: > On ...
7 years, 4 months ago (2013-08-12 23:51:34 UTC) #10
Kristen Dwan
addressed all. unfortunately, renaming session_id class file caused a loss in diff from foreign_session_id.. cr ...
7 years, 4 months ago (2013-08-15 07:11:56 UTC) #11
not at google - send to devlin
The only remaining major comment here is the thing about limiting with that filtering object. ...
7 years, 4 months ago (2013-08-15 20:16:23 UTC) #12
dharcourt
I have a few grammar/style nits after reading the API documentation generated from this code. ...
7 years, 4 months ago (2013-08-16 02:27:33 UTC) #13
Kristen Dwan
Added filter object to sessions.json, not sure about my specification about always returning windows even ...
7 years, 4 months ago (2013-08-16 22:03:05 UTC) #14
dharcourt
https://codereview.chromium.org/21022018/diff/114001/chrome/common/extensions/api/sessions.json File chrome/common/extensions/api/sessions.json (right): https://codereview.chromium.org/21022018/diff/114001/chrome/common/extensions/api/sessions.json#newcode28 chrome/common/extensions/api/sessions.json:28: }, FWIW, there are trailing spaces on this line ...
7 years, 4 months ago (2013-08-19 17:53:12 UTC) #15
not at google - send to devlin
lgtm, question about the documentation for specifying a tabs filter answered. Speaking of which it ...
7 years, 4 months ago (2013-08-19 19:34:39 UTC) #16
Kristen Dwan
Moved OWNERS file over. As for tests - the sessions_apitest.cc is what I currently have. ...
7 years, 4 months ago (2013-08-19 21:35:05 UTC) #17
Nicolas Zea
sync lgtm https://codereview.chromium.org/21022018/diff/150001/chrome/browser/sync/profile_sync_service_mock.h File chrome/browser/sync/profile_sync_service_mock.h (right): https://codereview.chromium.org/21022018/diff/150001/chrome/browser/sync/profile_sync_service_mock.h#newcode127 chrome/browser/sync/profile_sync_service_mock.h:127: MOCK_METHOD0(GetSessionModelAssociator, nit: move this to be right ...
7 years, 4 months ago (2013-08-19 23:54:40 UTC) #18
not at google - send to devlin
https://codereview.chromium.org/21022018/diff/150001/chrome/common/extensions/api/sessions.json File chrome/common/extensions/api/sessions.json (right): https://codereview.chromium.org/21022018/diff/150001/chrome/common/extensions/api/sessions.json#newcode7 chrome/common/extensions/api/sessions.json:7: "namespace": "sessions", ok, looks like git has decided that ...
7 years, 4 months ago (2013-08-20 16:43:32 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dwankri@chromium.org/21022018/43002
7 years, 4 months ago (2013-08-21 06:48:36 UTC) #20
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=21657
7 years, 4 months ago (2013-08-21 08:34:43 UTC) #21
Kristen Dwan
Rachel, could you check out chrome_browser_main_extra_parts_profile for owners? thanks!
7 years, 4 months ago (2013-08-21 14:48:51 UTC) #22
rpetterson
profiles/ LGTM On Aug 21, 2013 7:48 AM, <dwankri@chromium.org> wrote: > Rachel, could you check ...
7 years, 4 months ago (2013-08-21 14:52:48 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dwankri@chromium.org/21022018/43002
7 years, 4 months ago (2013-08-21 15:00:17 UTC) #24
commit-bot: I haz the power
Failed to apply patch for chrome/browser/extensions/extension_function_histogram_value.h: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 4 months ago (2013-08-21 15:00:44 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dwankri@chromium.org/21022018/216001
7 years, 4 months ago (2013-08-21 16:34:20 UTC) #26
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=21722
7 years, 4 months ago (2013-08-21 16:59:38 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dwankri@chromium.org/21022018/75002
7 years, 4 months ago (2013-08-22 16:51:40 UTC) #28
commit-bot: I haz the power
Change committed as 219066
7 years, 4 months ago (2013-08-22 19:21:57 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dwankri@chromium.org/21022018/184017
7 years, 4 months ago (2013-08-22 22:06:42 UTC) #30
commit-bot: I haz the power
7 years, 4 months ago (2013-08-23 02:13:03 UTC) #31
Message was sent while issue was closed.
Change committed as 219187

Powered by Google App Engine
This is Rietveld 408576698