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

Issue 10829186: Tabs API is usable without tabs permission. (Closed)

Created:
8 years, 4 months ago by chebert
Modified:
4 years, 4 months ago
CC:
not at google - send to devlin
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Tabs API is usable without tabs permission. All of the tabs api methods are now usable without needing to specify "tabs" permission in the manifest. However privacy sensitive data is stripped from the Tab object that is returned unless the permission is present. The privacy sensitive data includes: url, title, faviconURL BUG=137404

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Total comments: 1

Patch Set 4 : fixed failing browser/api tests #

Total comments: 3

Patch Set 5 : now passes Extension* into CreateTabValue #

Patch Set 6 : . #

Patch Set 7 : quick fix to get it working on android #

Patch Set 8 : . #

Total comments: 6

Patch Set 9 : . #

Total comments: 4

Patch Set 10 : now fires for events w/o extension_ids #

Patch Set 11 : fixed sample extensions #

Total comments: 14

Patch Set 12 : changes #

Patch Set 13 : . #

Total comments: 4

Patch Set 14 : ETU now SetString()'s for empty values #

Unified diffs Side-by-side diffs Delta from patch set Stats (+277 lines, -139 lines) Patch
M chrome/browser/extensions/all_urls_apitest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/messaging/message_service.cc View 1 2 3 4 5 6 7 8 2 chunks +8 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 17 chunks +32 lines, -26 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 12 13 29 chunks +45 lines, -5 lines 0 comments Download
M chrome/browser/extensions/browser_event_router.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +14 lines, -1 line 0 comments Download
M chrome/browser/extensions/browser_event_router.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +27 lines, -11 lines 0 comments Download
M chrome/browser/extensions/browser_extension_window_controller.h View 1 2 3 4 2 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/extensions/browser_extension_window_controller.cc View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/extensions/event_listener_map.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/extensions/event_router.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/extensions/event_router.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/execute_script_apitest.cc View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/extensions/extension_tab_util.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +9 lines, -4 lines 0 comments Download
M chrome/browser/extensions/extension_tab_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +60 lines, -27 lines 0 comments Download
M chrome/browser/extensions/extension_tab_util_android.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +13 lines, -6 lines 0 comments Download
M chrome/browser/extensions/extension_tabs_apitest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/extensions/menu_manager.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/window_controller.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/panels/panel.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +9 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/ash/panel_view_aura.cc View 1 2 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/common/extensions/docs/examples/api/bookmarks/basic/manifest.json View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/docs/examples/api/browserAction/make_page_red/manifest.json View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/extension_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/common/extensions/permissions/permission_set.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +1 line, -4 lines 0 comments Download
M chrome/common/extensions/permissions/permission_set_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/renderer/extensions/dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -13 lines 0 comments Download
M chrome/test/data/extensions/api_test/active_tab/background.js View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/active_tab/manifest.json View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/all_urls/content_script/manifest.json View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/events/background.js View 1 2 3 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/test/data/extensions/api_test/permissions/disabled/background.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +10 lines, -5 lines 0 comments Download

Messages

Total messages: 28 (0 generated)
chebert
Currently, it doesn't implement the console warnings yet.
8 years, 4 months ago (2012-08-05 19:05:02 UTC) #1
Matt Tytel
https://chromiumcodereview.appspot.com/10829186/diff/3008/chrome/common/extensions/permissions/permission_set.cc File chrome/common/extensions/permissions/permission_set.cc (left): https://chromiumcodereview.appspot.com/10829186/diff/3008/chrome/common/extensions/permissions/permission_set.cc#oldcode60 chrome/common/extensions/permissions/permission_set.cc:60: "management.getPermissionWarningsByManifest", Ignorant Drive-by comment: Should executeScript should require permission ...
8 years, 4 months ago (2012-08-06 18:45:23 UTC) #2
chebert
Aaron, I'm not sure how to incorporate console warnings into this set up. Also, let ...
8 years, 4 months ago (2012-08-07 19:43:20 UTC) #3
Aaron Boodman
Yeah, executeScript() already requires host permissions. http://codereview.chromium.org/10829186/diff/13001/chrome/browser/extensions/api/tabs/tabs.cc File chrome/browser/extensions/api/tabs/tabs.cc (right): http://codereview.chromium.org/10829186/diff/13001/chrome/browser/extensions/api/tabs/tabs.cc#newcode822 chrome/browser/extensions/api/tabs/tabs.cc:822: DictionaryValue* result = ...
8 years, 4 months ago (2012-08-10 06:44:51 UTC) #4
chebert
https://chromiumcodereview.appspot.com/10829186/diff/13001/chrome/browser/extensions/api/tabs/tabs.cc File chrome/browser/extensions/api/tabs/tabs.cc (right): https://chromiumcodereview.appspot.com/10829186/diff/13001/chrome/browser/extensions/api/tabs/tabs.cc#newcode822 chrome/browser/extensions/api/tabs/tabs.cc:822: DictionaryValue* result = ExtensionTabUtil::CreateTabValue( An overloaded version is called ...
8 years, 4 months ago (2012-08-13 23:52:17 UTC) #5
Aaron Boodman
So you're good on this right? (after our convo on irc)
8 years, 4 months ago (2012-08-15 04:31:03 UTC) #6
chebert
On 2012/08/15 04:31:03, Aaron Boodman wrote: > So you're good on this right? (after our ...
8 years, 4 months ago (2012-08-15 17:05:30 UTC) #7
chebert
Still doesn't display console warnings. I'm not sure how I would go about doing that.
8 years, 4 months ago (2012-08-20 21:53:50 UTC) #8
Aaron Boodman
+koz The console warnings might be quite a bit more work and warrant a separate ...
8 years, 4 months ago (2012-08-21 04:10:03 UTC) #9
koz (OOO until 15th September)
On 2012/08/21 04:10:03, Aaron Boodman wrote: > +koz > > The console warnings might be ...
8 years, 4 months ago (2012-08-21 05:40:44 UTC) #10
Aaron Boodman
http://codereview.chromium.org/10829186/diff/16027/chrome/browser/extensions/extension_tab_util.cc File chrome/browser/extensions/extension_tab_util.cc (right): http://codereview.chromium.org/10829186/diff/16027/chrome/browser/extensions/extension_tab_util.cc#newcode80 chrome/browser/extensions/extension_tab_util.cc:80: return ExtensionTabUtil::CreateTabValue(contents, This was here before, but I think ...
8 years, 4 months ago (2012-08-22 21:22:05 UTC) #11
chebert
https://chromiumcodereview.appspot.com/10829186/diff/16027/chrome/browser/extensions/extension_tab_util.cc File chrome/browser/extensions/extension_tab_util.cc (right): https://chromiumcodereview.appspot.com/10829186/diff/16027/chrome/browser/extensions/extension_tab_util.cc#newcode80 chrome/browser/extensions/extension_tab_util.cc:80: return ExtensionTabUtil::CreateTabValue(contents, On 2012/08/22 21:22:05, Aaron Boodman wrote: > ...
8 years, 4 months ago (2012-08-23 17:34:17 UTC) #12
Aaron Boodman
Sweet. Can you also please look through the samples that use the 'tabs' permission in ...
8 years, 4 months ago (2012-08-23 17:47:29 UTC) #13
chebert
Hey so since the docs server is up, I don't actually need to re-zip the ...
8 years, 3 months ago (2012-08-29 21:51:58 UTC) #14
chebert
Adding sky and jennb as reviewers for chrome/browser/ui/views/ash/panel_view_aura.cc and chrome/browser/ui/panels/panel.cc
8 years, 3 months ago (2012-08-29 21:55:51 UTC) #15
sky
LGTM
8 years, 3 months ago (2012-08-29 22:11:30 UTC) #16
jennb
LGTM for panels changes Hoping you'll land this soon as I'm making a change to ...
8 years, 3 months ago (2012-08-29 23:12:21 UTC) #17
Aaron Boodman
If possible it would be really good to get this landed this week. http://codereview.chromium.org/10829186/diff/34007/chrome/browser/extensions/browser_event_router.cc File ...
8 years, 3 months ago (2012-08-30 05:45:47 UTC) #18
not at google - send to devlin
drive-by: there is some code in chrome/renderer/extensions/dispatcher.cc that can be cleaned up with this patch. ...
8 years, 3 months ago (2012-08-30 06:05:34 UTC) #19
chebert
https://chromiumcodereview.appspot.com/10829186/diff/34007/chrome/browser/extensions/browser_event_router.cc File chrome/browser/extensions/browser_event_router.cc (right): https://chromiumcodereview.appspot.com/10829186/diff/34007/chrome/browser/extensions/browser_event_router.cc#newcode402 chrome/browser/extensions/browser_event_router.cc:402: listeners().listeners(event_name)); On 2012/08/30 05:45:48, Aaron Boodman wrote: > The ...
8 years, 3 months ago (2012-08-30 23:17:20 UTC) #20
chebert
https://chromiumcodereview.appspot.com/10829186/diff/34007/chrome/test/data/extensions/api_test/active_tab/manifest.json File chrome/test/data/extensions/api_test/active_tab/manifest.json (right): https://chromiumcodereview.appspot.com/10829186/diff/34007/chrome/test/data/extensions/api_test/active_tab/manifest.json#newcode12 chrome/test/data/extensions/api_test/active_tab/manifest.json:12: "tabs", Ok. pretend I didn't actually say this. On ...
8 years, 3 months ago (2012-08-30 23:31:14 UTC) #21
chebert
err. no. wait. this is right. Pretend I didn't ask you to ignore it. On ...
8 years, 3 months ago (2012-08-30 23:33:06 UTC) #22
Aaron Boodman
http://codereview.chromium.org/10829186/diff/40002/chrome/browser/extensions/browser_event_router.cc File chrome/browser/extensions/browser_event_router.cc (right): http://codereview.chromium.org/10829186/diff/40002/chrome/browser/extensions/browser_event_router.cc#newcode400 chrome/browser/extensions/browser_event_router.cc:400: const EventListenerMap::ListenerList& listeners( Nit: typical style would be to ...
8 years, 3 months ago (2012-08-31 20:28:51 UTC) #23
Aaron Boodman
Also, I just realized the 'windows' namespace should work the same way. But that can ...
8 years, 3 months ago (2012-08-31 20:29:17 UTC) #24
jennb
http://codereview.chromium.org/10829186/diff/40002/chrome/browser/ui/panels/panel.cc File chrome/browser/ui/panels/panel.cc (right): http://codereview.chromium.org/10829186/diff/40002/chrome/browser/ui/panels/panel.cc#newcode92 chrome/browser/ui/panels/panel.cc:92: // Safe to include info about the web contents ...
8 years, 3 months ago (2012-08-31 21:41:00 UTC) #25
chebert
Aboodman: would like your lg before I commit this because I went back to setting ...
8 years, 3 months ago (2012-09-01 00:40:30 UTC) #26
Aaron Boodman
3) mark the fields optional in json schema and check that all the places we ...
8 years, 3 months ago (2012-09-01 01:03:09 UTC) #27
Aaron Boodman
8 years, 3 months ago (2012-09-04 07:36:34 UTC) #28
I landed this for you in crrev.com/154730 with a few minor changes. Thanks so
much for the patch, this will be a really nice improvement.

Powered by Google App Engine
This is Rietveld 408576698