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

Issue 201393002: Add onChanged callback for chrome.sessions API. (Closed)

Created:
6 years, 9 months ago by wjywbs
Modified:
6 years, 8 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Add onChanged callback for chrome.sessions API. Currently there is no method to receive the changes of recently closed pages in chrome.sessions APIs. This callback can give extensions a chance to know there is a change and update by calling GetRecentlyClosed again. R=kalman@chromium.org BUG=353007 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=260464

Patch Set 1 #

Total comments: 5

Patch Set 2 : rename to onChanged, rebase #

Total comments: 12

Patch Set 3 : kalman's comment, rebase #

Patch Set 4 : Update test #

Total comments: 3

Patch Set 5 : #

Patch Set 6 : Use EventRouter::Get #

Total comments: 1

Patch Set 7 : #

Patch Set 8 : #

Total comments: 1

Patch Set 9 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+171 lines, -0 lines) Patch
M chrome/browser/extensions/api/sessions/sessions_api.h View 2 chunks +58 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/sessions/sessions_api.cc View 1 2 3 4 5 2 chunks +56 lines, -0 lines 0 comments Download
M chrome/browser/extensions/browser_context_keyed_service_factories.cc View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/sessions.json View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/sessions/sessions.js View 1 2 3 4 5 6 7 8 12 chunks +48 lines, -0 lines 0 comments Download

Messages

Total messages: 51 (0 generated)
wjywbs
Hello kalman, I read the "API Proposals (New APIs Start Here)" wiki, but I am ...
6 years, 9 months ago (2014-03-16 20:31:32 UTC) #1
not at google - send to devlin
https://codereview.chromium.org/201393002/diff/1/chrome/common/extensions/api/sessions.json File chrome/common/extensions/api/sessions.json (right): https://codereview.chromium.org/201393002/diff/1/chrome/common/extensions/api/sessions.json#newcode110 chrome/common/extensions/api/sessions.json:110: "events": [ Cool, we've wanted to add this sort ...
6 years, 9 months ago (2014-03-17 14:21:17 UTC) #2
wjywbs
Replied comments. Thanks. https://codereview.chromium.org/201393002/diff/1/chrome/common/extensions/api/sessions.json File chrome/common/extensions/api/sessions.json (right): https://codereview.chromium.org/201393002/diff/1/chrome/common/extensions/api/sessions.json#newcode110 chrome/common/extensions/api/sessions.json:110: "events": [ On 2014/03/17 14:21:18, kalman ...
6 years, 9 months ago (2014-03-17 19:27:23 UTC) #3
not at google - send to devlin
https://codereview.chromium.org/201393002/diff/1/chrome/common/extensions/api/sessions.json File chrome/common/extensions/api/sessions.json (right): https://codereview.chromium.org/201393002/diff/1/chrome/common/extensions/api/sessions.json#newcode110 chrome/common/extensions/api/sessions.json:110: "events": [ On 2014/03/17 19:27:24, wjywbs wrote: > On ...
6 years, 9 months ago (2014-03-19 16:22:40 UTC) #4
wjywbs
Friendly ping. I’ve renamed the event name to onChanged. PTAL, thanks.
6 years, 9 months ago (2014-03-21 00:02:37 UTC) #5
not at google - send to devlin
https://codereview.chromium.org/201393002/diff/20001/chrome/common/extensions/api/sessions.json File chrome/common/extensions/api/sessions.json (right): https://codereview.chromium.org/201393002/diff/20001/chrome/common/extensions/api/sessions.json#newcode113 chrome/common/extensions/api/sessions.json:113: "description": "Fired when recently closed tabs and/or windows are ...
6 years, 9 months ago (2014-03-21 10:52:58 UTC) #6
not at google - send to devlin
sent comment too early. https://codereview.chromium.org/201393002/diff/20001/chrome/browser/extensions/api/sessions/sessions_api.cc File chrome/browser/extensions/api/sessions/sessions_api.cc (right): https://codereview.chromium.org/201393002/diff/20001/chrome/browser/extensions/api/sessions/sessions_api.cc#newcode582 chrome/browser/extensions/api/sessions/sessions_api.cc:582: : profile_(profile), tab_restore_service_(NULL) { just ...
6 years, 9 months ago (2014-03-21 11:03:06 UTC) #7
Yoyo Zhou
https://codereview.chromium.org/201393002/diff/20001/chrome/browser/extensions/api/sessions/sessions_api.cc File chrome/browser/extensions/api/sessions/sessions_api.cc (right): https://codereview.chromium.org/201393002/diff/20001/chrome/browser/extensions/api/sessions/sessions_api.cc#newcode641 chrome/browser/extensions/api/sessions/sessions_api.cc:641: ExtensionSystem::Get(browser_context_)->event_router()->UnregisterObserver( On 2014/03/21 11:03:06, kalman wrote: > I don't ...
6 years, 9 months ago (2014-03-21 15:56:01 UTC) #8
not at google - send to devlin
https://codereview.chromium.org/201393002/diff/20001/chrome/browser/extensions/api/sessions/sessions_api.cc File chrome/browser/extensions/api/sessions/sessions_api.cc (right): https://codereview.chromium.org/201393002/diff/20001/chrome/browser/extensions/api/sessions/sessions_api.cc#newcode641 chrome/browser/extensions/api/sessions/sessions_api.cc:641: ExtensionSystem::Get(browser_context_)->event_router()->UnregisterObserver( On 2014/03/21 15:56:02, Yoyo Zhou wrote: > On ...
6 years, 9 months ago (2014-03-21 15:56:56 UTC) #9
wjywbs
Modified per kalman's comment. I copied a lot of existing code from recently_closed_tabs_handler.cc and management_api.cc ...
6 years, 9 months ago (2014-03-21 19:45:32 UTC) #10
not at google - send to devlin
On 2014/03/21 19:45:32, wjywbs wrote: > Modified per kalman's comment. > > I copied a ...
6 years, 9 months ago (2014-03-21 20:13:27 UTC) #11
wjywbs
I updated the testing method. PTAL. Thanks.
6 years, 9 months ago (2014-03-21 21:20:59 UTC) #12
not at google - send to devlin
https://codereview.chromium.org/201393002/diff/60001/chrome/browser/extensions/api/sessions/sessions_api.cc File chrome/browser/extensions/api/sessions/sessions_api.cc (right): https://codereview.chromium.org/201393002/diff/60001/chrome/browser/extensions/api/sessions/sessions_api.cc#newcode607 chrome/browser/extensions/api/sessions/sessions_api.cc:607: ExtensionSystem::Get(profile_)->event_router()->BroadcastEvent( You can now use just EventRouter::Get(profile_) here and ...
6 years, 9 months ago (2014-03-26 21:12:37 UTC) #13
wjywbs
I updated the test and used EventRouter::Get. PTAL. Thanks.
6 years, 9 months ago (2014-03-28 14:14:23 UTC) #14
not at google - send to devlin
nice! lgtm. https://codereview.chromium.org/201393002/diff/100001/chrome/test/data/extensions/api_test/sessions/sessions.js File chrome/test/data/extensions/api_test/sessions/sessions.js (right): https://codereview.chromium.org/201393002/diff/100001/chrome/test/data/extensions/api_test/sessions/sessions.js#newcode85 chrome/test/data/extensions/api_test/sessions/sessions.js:85: window.setTimeout(checkEvent, 100); 100*10ms is too small, this ...
6 years, 9 months ago (2014-03-28 15:51:09 UTC) #15
wjywbs
I removed the retry and increased the retry wait time to 300ms. In my testing, ...
6 years, 9 months ago (2014-03-28 18:25:26 UTC) #16
not at google - send to devlin
On 2014/03/28 18:25:26, wjywbs wrote: > I removed the retry and increased the retry wait ...
6 years, 9 months ago (2014-03-28 18:28:12 UTC) #17
wjywbs
Sure. PTAL and thanks.
6 years, 9 months ago (2014-03-28 18:41:54 UTC) #18
not at google - send to devlin
lgtm https://codereview.chromium.org/201393002/diff/120001/chrome/test/data/extensions/api_test/sessions/sessions.js File chrome/test/data/extensions/api_test/sessions/sessions.js (right): https://codereview.chromium.org/201393002/diff/120001/chrome/test/data/extensions/api_test/sessions/sessions.js#newcode78 chrome/test/data/extensions/api_test/sessions/sessions.js:78: window.setTimeout(checkEvent, 100); last nit: declare this 100 as ...
6 years, 9 months ago (2014-03-28 18:44:48 UTC) #19
wjywbs
Sure. PTAL.
6 years, 9 months ago (2014-03-28 18:50:10 UTC) #20
not at google - send to devlin
lgtm
6 years, 9 months ago (2014-03-28 18:54:51 UTC) #21
wjywbs
The CQ bit was checked by wjywbs@gmail.com
6 years, 9 months ago (2014-03-28 18:55:42 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjywbs@gmail.com/201393002/140001
6 years, 9 months ago (2014-03-28 18:59:49 UTC) #23
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-28 20:37:38 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
6 years, 9 months ago (2014-03-28 20:37:40 UTC) #25
wjywbs
The CQ bit was checked by wjywbs@gmail.com
6 years, 8 months ago (2014-03-28 23:10:18 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjywbs@gmail.com/201393002/140001
6 years, 8 months ago (2014-03-28 23:11:32 UTC) #27
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-03-29 00:34:07 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
6 years, 8 months ago (2014-03-29 00:34:07 UTC) #29
wjywbs
The CQ bit was checked by wjywbs@gmail.com
6 years, 8 months ago (2014-03-29 03:26:50 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjywbs@gmail.com/201393002/140001
6 years, 8 months ago (2014-03-29 03:28:04 UTC) #31
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-03-29 05:10:46 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
6 years, 8 months ago (2014-03-29 05:10:47 UTC) #33
wjywbs
The CQ bit was checked by wjywbs@gmail.com
6 years, 8 months ago (2014-03-29 05:27:38 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjywbs@gmail.com/201393002/140001
6 years, 8 months ago (2014-03-29 05:28:07 UTC) #35
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-03-29 06:57:22 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
6 years, 8 months ago (2014-03-29 06:57:23 UTC) #37
wjywbs
The CQ bit was checked by wjywbs@gmail.com
6 years, 8 months ago (2014-03-29 15:01:31 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjywbs@gmail.com/201393002/140001
6 years, 8 months ago (2014-03-29 15:01:38 UTC) #39
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-03-29 16:33:43 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
6 years, 8 months ago (2014-03-29 16:33:44 UTC) #41
wjywbs
The CQ bit was checked by wjywbs@gmail.com
6 years, 8 months ago (2014-03-29 22:12:20 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjywbs@gmail.com/201393002/140001
6 years, 8 months ago (2014-03-29 22:12:36 UTC) #43
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-03-29 22:56:38 UTC) #44
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
6 years, 8 months ago (2014-03-29 22:56:38 UTC) #45
wjywbs
The CQ bit was checked by wjywbs@gmail.com
6 years, 8 months ago (2014-03-29 23:00:41 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjywbs@gmail.com/201393002/140001
6 years, 8 months ago (2014-03-29 23:01:02 UTC) #47
wjywbs
The CQ bit was unchecked by wjywbs@gmail.com
6 years, 8 months ago (2014-03-30 17:18:16 UTC) #48
wjywbs
The CQ bit was checked by wjywbs@gmail.com
6 years, 8 months ago (2014-03-30 17:19:04 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wjywbs@gmail.com/201393002/140001
6 years, 8 months ago (2014-03-30 17:19:06 UTC) #50
commit-bot: I haz the power
6 years, 8 months ago (2014-03-30 20:49:02 UTC) #51
Message was sent while issue was closed.
Change committed as 260464

Powered by Google App Engine
This is Rietveld 408576698