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

Issue 2067033002: Discarded property on chrome.tabs.Tab and chrome.tabs.query() (Closed)

Created:
4 years, 6 months ago by Anderson Silva
Modified:
4 years, 5 months ago
CC:
chromium-apps-reviews_chromium.org, chromium-reviews, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adding new Discarded property on Tab type and query() function on existing Tabs API. BUG=621070 Committed: https://crrev.com/12caff1b13a6b2b7721897240aaa143fc8714276 Cr-Commit-Position: refs/heads/master@{#405492}

Patch Set 1 #

Total comments: 7

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Total comments: 4

Patch Set 4 : #

Total comments: 17

Patch Set 5 : #

Patch Set 6 : Merged tot. #

Patch Set 7 : browsertest to unittest #

Total comments: 13

Patch Set 8 : fixing #

Patch Set 9 : fix comment #

Total comments: 4

Patch Set 10 : testing tab_object creation #

Patch Set 11 : back to browser_test #

Total comments: 2

Patch Set 12 : added lambda expression to simplify test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -0 lines) Patch
M chrome/browser/extensions/api/tabs/tabs_api.cc View 1 2 3 4 5 6 7 8 9 4 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_test.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +127 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_tab_util.cc View 1 2 3 4 5 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/tabs.json View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 58 (16 generated)
Anderson Silva
PTAL
4 years, 6 months ago (2016-06-15 13:40:20 UTC) #3
chrisha
https://codereview.chromium.org/2067033002/diff/1/chrome/browser/extensions/api/tabs/tabs_api.cc File chrome/browser/extensions/api/tabs/tabs_api.cc (right): https://codereview.chromium.org/2067033002/diff/1/chrome/browser/extensions/api/tabs/tabs_api.cc#newcode1002 chrome/browser/extensions/api/tabs/tabs_api.cc:1002: // If tab_manager is not present, none tabs are ...
4 years, 6 months ago (2016-06-15 15:56:12 UTC) #4
Georges Khalil
I'll wait for Chris' comments to be addressed before reviewing this in more details. Ideally, ...
4 years, 6 months ago (2016-06-15 17:25:43 UTC) #5
Anderson Silva
PTAL https://codereview.chromium.org/2067033002/diff/1/chrome/browser/extensions/api/tabs/tabs_api.cc File chrome/browser/extensions/api/tabs/tabs_api.cc (right): https://codereview.chromium.org/2067033002/diff/1/chrome/browser/extensions/api/tabs/tabs_api.cc#newcode1002 chrome/browser/extensions/api/tabs/tabs_api.cc:1002: // If tab_manager is not present, none tabs ...
4 years, 6 months ago (2016-06-16 14:04:52 UTC) #6
chrisha
The code lgtm. I've got no knowledge of the Extension API process, so please be ...
4 years, 6 months ago (2016-06-16 16:35:17 UTC) #7
Georges Khalil
Alright, looks good to me as well, so time for an owner's review. https://codereview.chromium.org/2067033002/diff/20001/chrome/browser/extensions/api/tabs/tabs_api.cc File ...
4 years, 6 months ago (2016-06-16 20:22:13 UTC) #8
Anderson Silva
Hi Ken, Can you please take a look at this CL? We're adding a new ...
4 years, 6 months ago (2016-06-16 21:53:08 UTC) #10
Ken Rockot(use gerrit already)
Adding Devlin instead. Seems like a small change but it still needs an API review ...
4 years, 6 months ago (2016-06-16 21:56:15 UTC) #13
Devlin
On 2016/06/16 21:56:15, Ken Rockot wrote: > Adding Devlin instead. Seems like a small change ...
4 years, 6 months ago (2016-06-16 22:11:08 UTC) #14
chromium-reviews
Thanks, sounds good. We'll link what we have soon. Even though we send the design ...
4 years, 6 months ago (2016-06-16 23:11:21 UTC) #15
Anderson Silva
Oh and we created a tracking bug for it: http://crbug.com/621070 On 2016/06/16 23:11:21, chromium-reviews wrote: ...
4 years, 6 months ago (2016-06-17 14:19:18 UTC) #17
Devlin
This warrants a test or two. https://codereview.chromium.org/2067033002/diff/40001/chrome/common/extensions/api/tabs.json File chrome/common/extensions/api/tabs.json (right): https://codereview.chromium.org/2067033002/diff/40001/chrome/common/extensions/api/tabs.json#newcode54 chrome/common/extensions/api/tabs.json:54: "discarded": {"type": "boolean", ...
4 years, 6 months ago (2016-06-17 17:49:26 UTC) #18
Anderson Silva
Included some tests. https://codereview.chromium.org/2067033002/diff/40001/chrome/common/extensions/api/tabs.json File chrome/common/extensions/api/tabs.json (right): https://codereview.chromium.org/2067033002/diff/40001/chrome/common/extensions/api/tabs.json#newcode54 chrome/common/extensions/api/tabs.json:54: "discarded": {"type": "boolean", "description": "Whether the ...
4 years, 6 months ago (2016-06-21 15:05:51 UTC) #19
Georges Khalil
Small addition to a test + nit. https://codereview.chromium.org/2067033002/diff/60001/chrome/browser/extensions/api/tabs/tabs_test.cc File chrome/browser/extensions/api/tabs/tabs_test.cc (right): https://codereview.chromium.org/2067033002/diff/60001/chrome/browser/extensions/api/tabs/tabs_test.cc#newcode734 chrome/browser/extensions/api/tabs/tabs_test.cc:734: } I ...
4 years, 6 months ago (2016-06-21 15:31:20 UTC) #20
Devlin
https://codereview.chromium.org/2067033002/diff/60001/chrome/browser/extensions/api/tabs/tabs_api_unittest.cc File chrome/browser/extensions/api/tabs/tabs_api_unittest.cc (right): https://codereview.chromium.org/2067033002/diff/60001/chrome/browser/extensions/api/tabs/tabs_api_unittest.cc#newcode220 chrome/browser/extensions/api/tabs/tabs_api_unittest.cc:220: content::WebContentsTester::CreateTestWebContents(profile(), nullptr); inline this, rather than assigning ownership and ...
4 years, 6 months ago (2016-06-21 20:27:08 UTC) #21
Devlin
On 2016/06/21 20:27:08, Devlin wrote: > https://codereview.chromium.org/2067033002/diff/60001/chrome/browser/extensions/api/tabs/tabs_api_unittest.cc > File chrome/browser/extensions/api/tabs/tabs_api_unittest.cc (right): > > https://codereview.chromium.org/2067033002/diff/60001/chrome/browser/extensions/api/tabs/tabs_api_unittest.cc#newcode220 > ...
4 years, 6 months ago (2016-06-21 20:27:43 UTC) #22
Devlin
Okay, ignore comment about testing retrieving discarded tabs. :) https://codereview.chromium.org/2067033002/diff/60001/chrome/browser/extensions/api/tabs/tabs_test.cc File chrome/browser/extensions/api/tabs/tabs_test.cc (right): https://codereview.chromium.org/2067033002/diff/60001/chrome/browser/extensions/api/tabs/tabs_test.cc#newcode640 chrome/browser/extensions/api/tabs/tabs_test.cc:640: ...
4 years, 6 months ago (2016-06-21 20:31:51 UTC) #23
Anderson Silva
Thanks for reviewing. Have fixed for the previous comments. Lemme know if there's anything else. ...
4 years, 5 months ago (2016-06-27 18:21:53 UTC) #24
Devlin
https://codereview.chromium.org/2067033002/diff/60001/chrome/browser/extensions/api/tabs/tabs_test.cc File chrome/browser/extensions/api/tabs/tabs_test.cc (right): https://codereview.chromium.org/2067033002/diff/60001/chrome/browser/extensions/api/tabs/tabs_test.cc#newcode640 chrome/browser/extensions/api/tabs/tabs_test.cc:640: ASSERT_TRUE(g_browser_process && g_browser_process->GetTabManager()); On 2016/06/27 18:21:53, Anderson Silva wrote: ...
4 years, 5 months ago (2016-06-28 20:14:30 UTC) #25
Anderson Silva
On 2016/06/28 20:14:30, Devlin wrote: > https://codereview.chromium.org/2067033002/diff/60001/chrome/browser/extensions/api/tabs/tabs_test.cc > File chrome/browser/extensions/api/tabs/tabs_test.cc (right): > > https://codereview.chromium.org/2067033002/diff/60001/chrome/browser/extensions/api/tabs/tabs_test.cc#newcode640 > ...
4 years, 5 months ago (2016-06-30 21:55:26 UTC) #26
Devlin
On 2016/06/30 21:55:26, Anderson Silva wrote: > On 2016/06/28 20:14:30, Devlin wrote: > > > ...
4 years, 5 months ago (2016-06-30 22:23:20 UTC) #27
Anderson Silva
On 2016/06/30 22:23:20, Devlin wrote: > On 2016/06/30 21:55:26, Anderson Silva wrote: > > On ...
4 years, 5 months ago (2016-07-11 14:08:04 UTC) #28
Anderson Silva
On 2016/07/11 14:08:04, Anderson Silva wrote: > On 2016/06/30 22:23:20, Devlin wrote: > > On ...
4 years, 5 months ago (2016-07-11 14:45:02 UTC) #31
Anderson Silva
On 2016/07/11 14:45:02, Anderson Silva wrote: > On 2016/07/11 14:08:04, Anderson Silva wrote: > > ...
4 years, 5 months ago (2016-07-11 16:22:33 UTC) #35
Devlin
Unittest looks great, thank you for doing that! https://codereview.chromium.org/2067033002/diff/220001/chrome/browser/extensions/api/tabs/tabs_api_unittest.cc File chrome/browser/extensions/api/tabs/tabs_api_unittest.cc (right): https://codereview.chromium.org/2067033002/diff/220001/chrome/browser/extensions/api/tabs/tabs_api_unittest.cc#newcode219 chrome/browser/extensions/api/tabs/tabs_api_unittest.cc:219: TEST_F(TabsApiUnitTest, ...
4 years, 5 months ago (2016-07-11 16:32:28 UTC) #36
Anderson Silva
ptal https://codereview.chromium.org/2067033002/diff/220001/chrome/browser/extensions/api/tabs/tabs_api_unittest.cc File chrome/browser/extensions/api/tabs/tabs_api_unittest.cc (right): https://codereview.chromium.org/2067033002/diff/220001/chrome/browser/extensions/api/tabs/tabs_api_unittest.cc#newcode219 chrome/browser/extensions/api/tabs/tabs_api_unittest.cc:219: TEST_F(TabsApiUnitTest, QueryDiscarded) { On 2016/07/11 16:32:28, Devlin wrote: ...
4 years, 5 months ago (2016-07-11 19:47:51 UTC) #37
Anderson Silva
modified comment for better explanation https://codereview.chromium.org/2067033002/diff/220001/chrome/browser/extensions/api/tabs/tabs_api_unittest.cc File chrome/browser/extensions/api/tabs/tabs_api_unittest.cc (right): https://codereview.chromium.org/2067033002/diff/220001/chrome/browser/extensions/api/tabs/tabs_api_unittest.cc#newcode341 chrome/browser/extensions/api/tabs/tabs_api_unittest.cc:341: browser()->tab_strip_model()->CloseAllTabs(); On 2016/07/11 16:32:28, ...
4 years, 5 months ago (2016-07-11 19:50:53 UTC) #38
Devlin
lgtm; thanks for all your work here! https://codereview.chromium.org/2067033002/diff/260001/chrome/browser/extensions/api/tabs/tabs_api.cc File chrome/browser/extensions/api/tabs/tabs_api.cc (right): https://codereview.chromium.org/2067033002/diff/260001/chrome/browser/extensions/api/tabs/tabs_api.cc#newcode997 chrome/browser/extensions/api/tabs/tabs_api.cc:997: // the ...
4 years, 5 months ago (2016-07-11 20:25:04 UTC) #39
Anderson Silva
thanks for reviewing Davlin! I added the piece of code for testing tab_creation. https://codereview.chromium.org/2067033002/diff/260001/chrome/browser/extensions/api/tabs/tabs_api.cc File ...
4 years, 5 months ago (2016-07-11 21:25:55 UTC) #40
Georges Khalil
It doesn't seem as if we'll be able to convert that test into a unit ...
4 years, 5 months ago (2016-07-13 13:33:52 UTC) #42
Devlin
On 2016/07/13 13:33:52, Georges Khalil wrote: > It doesn't seem as if we'll be able ...
4 years, 5 months ago (2016-07-13 15:04:55 UTC) #43
Georges Khalil
On 2016/07/13 15:04:55, Devlin wrote: > On 2016/07/13 13:33:52, Georges Khalil wrote: > > It ...
4 years, 5 months ago (2016-07-13 15:26:05 UTC) #44
Devlin
On 2016/07/13 15:26:05, Georges Khalil wrote: > On 2016/07/13 15:04:55, Devlin wrote: > > On ...
4 years, 5 months ago (2016-07-13 16:03:46 UTC) #45
Georges Khalil
On 2016/07/13 16:03:46, Devlin wrote: > On 2016/07/13 15:26:05, Georges Khalil wrote: > > On ...
4 years, 5 months ago (2016-07-13 17:32:41 UTC) #46
Devlin
On 2016/07/13 17:32:41, Georges Khalil wrote: > On 2016/07/13 16:03:46, Devlin wrote: > > On ...
4 years, 5 months ago (2016-07-13 18:27:30 UTC) #47
Anderson Silva
On 2016/07/13 18:27:30, Devlin wrote: > On 2016/07/13 17:32:41, Georges Khalil wrote: > > On ...
4 years, 5 months ago (2016-07-13 19:32:03 UTC) #48
Devlin
lgtm with optional nit https://codereview.chromium.org/2067033002/diff/320001/chrome/browser/extensions/api/tabs/tabs_test.cc File chrome/browser/extensions/api/tabs/tabs_test.cc (right): https://codereview.chromium.org/2067033002/diff/320001/chrome/browser/extensions/api/tabs/tabs_test.cc#newcode1335 chrome/browser/extensions/api/tabs/tabs_test.cc:1335: utils::ToList(utils::RunFunctionAndReturnSingleResult( optional nit: These lines ...
4 years, 5 months ago (2016-07-13 20:17:47 UTC) #49
Anderson Silva
Added the lambda expression. Committing to CQ now. Thanks a lot for reviewing. https://codereview.chromium.org/2067033002/diff/320001/chrome/browser/extensions/api/tabs/tabs_test.cc File ...
4 years, 5 months ago (2016-07-14 14:38:43 UTC) #50
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/2067033002/340001
4 years, 5 months ago (2016-07-14 14:39:11 UTC) #53
commit-bot: I haz the power
Committed patchset #12 (id:340001)
4 years, 5 months ago (2016-07-14 14:43:57 UTC) #55
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-14 14:44:06 UTC) #56
commit-bot: I haz the power
4 years, 5 months ago (2016-07-14 14:45:20 UTC) #58
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/12caff1b13a6b2b7721897240aaa143fc8714276
Cr-Commit-Position: refs/heads/master@{#405492}

Powered by Google App Engine
This is Rietveld 408576698