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

Issue 9460002: Convert app_bindings.js to the schema_generated_bindings.js infrastructure. (Closed)

Created:
8 years, 10 months ago by not at google - send to devlin
Modified:
8 years, 9 months ago
CC:
chromium-reviews, Aaron Boodman, darin-cc_chromium.org, mihaip+watch_chromium.org, brettw-cc_chromium.org, benwells
Visibility:
Public.

Description

Convert app_bindings.js to the schema_generated_bindings.js infrastructure. This involves opening up *all* custom bindings to web pages, where access is controlled content-script style using a URL-matches property in the API schema. BUG=104100, 117282 TEST=unit_tests,browser_tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=125811 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=127391 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=127899

Patch Set 1 #

Total comments: 6

Patch Set 2 : fix stubs test, rebase #

Patch Set 3 : koz comments #

Total comments: 18

Patch Set 4 : aa comments #

Total comments: 8

Patch Set 5 : merge with koz patch! #

Total comments: 1

Patch Set 6 : fix koz bool thing #

Total comments: 29

Patch Set 7 : aa comments #

Patch Set 8 : koz/aa comments #

Patch Set 9 : rebase to after koz change #

Patch Set 10 : REBASE BABY #

Patch Set 11 : reabse #

Total comments: 6

Patch Set 12 : Go back to manually injecting app_custom_bindings.js #

Total comments: 5

Patch Set 13 : make test extension ID tests pass #

Unified diffs Side-by-side diffs Delta from patch set Stats (+615 lines, -521 lines) Patch
M chrome/browser/renderer_host/chrome_render_view_host_observer.cc View 1 2 3 4 5 6 7 8 9 2 chunks +15 lines, -8 lines 0 comments Download
M chrome/chrome_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +1 line, -4 lines 0 comments Download
M chrome/common/common_resources.grd View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
A chrome/common/extensions/api/app.json View 1 chunk +70 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/extension_api.h View 1 2 3 4 5 6 7 6 chunks +35 lines, -33 lines 0 comments Download
M chrome/common/extensions/api/extension_api.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +112 lines, -56 lines 0 comments Download
M chrome/common/extensions/api/extension_api_unittest.cc View 1 2 3 4 4 chunks +115 lines, -29 lines 0 comments Download
M chrome/common/extensions/extension_messages.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/common/extensions/extension_permission_set.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension_permission_set.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +11 lines, -0 lines 0 comments Download
M chrome/common/extensions/feature.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +13 lines, -3 lines 0 comments Download
M chrome/common/extensions/feature.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/feature_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -1 line 0 comments Download
M chrome/renderer/extensions/app_bindings.cc View 1 2 3 4 5 6 7 8 3 chunks +1 line, -4 lines 0 comments Download
M chrome/renderer/extensions/chrome_v8_context.h View 1 2 3 4 4 chunks +4 lines, -12 lines 0 comments Download
M chrome/renderer/extensions/chrome_v8_context.cc View 1 2 3 4 5 6 7 8 3 chunks +9 lines, -5 lines 0 comments Download
M chrome/renderer/extensions/chrome_v8_context_set_unittest.cc View 1 2 3 4 2 chunks +6 lines, -3 lines 0 comments Download
D chrome/renderer/extensions/custom_bindings_util.h View 1 2 3 4 1 chunk +0 lines, -44 lines 0 comments Download
D chrome/renderer/extensions/custom_bindings_util.cc View 1 2 3 4 1 chunk +0 lines, -92 lines 0 comments Download
M chrome/renderer/extensions/extension_custom_bindings.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/renderer/extensions/extension_dispatcher.h View 1 2 3 4 5 6 7 8 5 chunks +13 lines, -13 lines 0 comments Download
M chrome/renderer/extensions/extension_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 16 chunks +100 lines, -123 lines 0 comments Download
M chrome/renderer/extensions/schema_generated_bindings.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +27 lines, -16 lines 0 comments Download
M chrome/renderer/renderer_resources.grd View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +2 lines, -3 lines 0 comments Download
M chrome/renderer/resource_bundle_source_map.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
D chrome/renderer/resources/extensions/app.js View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -41 lines 0 comments Download
A chrome/renderer/resources/extensions/app_custom_bindings.js View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +52 lines, -0 lines 0 comments Download
M chrome/renderer/resources/extensions/schema_generated_bindings.js View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/renderer/resources/extensions/setup_bindings.js View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -16 lines 0 comments Download
M chrome/test/data/extensions/api_test/content_scripts/extension_iframe/iframe.js View 1 2 3 4 1 chunk +8 lines, -4 lines 0 comments Download
M chrome/test/data/extensions/api_test/stubs/content_script.js View 1 3 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
not at google - send to devlin
appNotifications and webstore stuff upcoming, then we can close that bug!
8 years, 10 months ago (2012-02-24 07:12:34 UTC) #1
not at google - send to devlin
Actually, this failed a few tryjobs so I think it needs a bit more work. ...
8 years, 10 months ago (2012-02-24 10:41:52 UTC) #2
not at google - send to devlin
Just needed to fix Stubs test, good to go!
8 years, 10 months ago (2012-02-27 00:55:13 UTC) #3
koz (OOO until 15th September)
lgtm https://chromiumcodereview.appspot.com/9460002/diff/1/chrome/common/extensions/api/extension_api_unittest.cc File chrome/common/extensions/api/extension_api_unittest.cc (right): https://chromiumcodereview.appspot.com/9460002/diff/1/chrome/common/extensions/api/extension_api_unittest.cc#newcode123 chrome/common/extensions/api/extension_api_unittest.cc:123: "chrome-extension://fakeextension")); nit: This seems redundant to have the ...
8 years, 10 months ago (2012-02-27 03:04:11 UTC) #4
not at google - send to devlin
http://codereview.chromium.org/9460002/diff/1/chrome/common/extensions/api/extension_api_unittest.cc File chrome/common/extensions/api/extension_api_unittest.cc (right): http://codereview.chromium.org/9460002/diff/1/chrome/common/extensions/api/extension_api_unittest.cc#newcode123 chrome/common/extensions/api/extension_api_unittest.cc:123: "chrome-extension://fakeextension")); On 2012/02/27 03:04:11, koz wrote: > nit: This ...
8 years, 10 months ago (2012-02-27 04:44:24 UTC) #5
Aaron Boodman
extension_dispatcher.cc is kinda a mess, but I guess this will get better once we have ...
8 years, 10 months ago (2012-02-27 23:32:31 UTC) #6
not at google - send to devlin
(p.s. I removed that unnecessary logging line but didn't want to pollute code review history ...
8 years, 9 months ago (2012-02-28 05:00:04 UTC) #7
Aaron Boodman
http://codereview.chromium.org/9460002/diff/4006/chrome/common/extensions/api/app.json File chrome/common/extensions/api/app.json (right): http://codereview.chromium.org/9460002/diff/4006/chrome/common/extensions/api/app.json#newcode6 chrome/common/extensions/api/app.json:6: "matches": [ "<all_urls>" ], On 2012/02/28 05:00:04, kalman wrote: ...
8 years, 9 months ago (2012-02-29 01:03:57 UTC) #8
not at google - send to devlin
Ok, this patch changed *a lot*. Mostly because I merged it with koz's unsubmitted change ...
8 years, 9 months ago (2012-03-05 07:46:54 UTC) #9
Aaron Boodman
nice http://codereview.chromium.org/9460002/diff/18034/chrome/browser/renderer_host/chrome_render_view_host_observer.cc File chrome/browser/renderer_host/chrome_render_view_host_observer.cc (right): http://codereview.chromium.org/9460002/diff/18034/chrome/browser/renderer_host/chrome_render_view_host_observer.cc#newcode120 chrome/browser/renderer_host/chrome_render_view_host_observer.cc:120: if (type != Extension::TYPE_THEME) I prefer a whitelist ...
8 years, 9 months ago (2012-03-06 01:17:21 UTC) #10
not at google - send to devlin
http://codereview.chromium.org/9460002/diff/18034/chrome/browser/renderer_host/chrome_render_view_host_observer.cc File chrome/browser/renderer_host/chrome_render_view_host_observer.cc (right): http://codereview.chromium.org/9460002/diff/18034/chrome/browser/renderer_host/chrome_render_view_host_observer.cc#newcode120 chrome/browser/renderer_host/chrome_render_view_host_observer.cc:120: if (type != Extension::TYPE_THEME) On 2012/03/06 01:17:21, Aaron Boodman ...
8 years, 9 months ago (2012-03-06 03:53:00 UTC) #11
koz (OOO until 15th September)
http://codereview.chromium.org/9460002/diff/18034/chrome/common/extensions/api/extension_api.cc File chrome/common/extensions/api/extension_api.cc (right): http://codereview.chromium.org/9460002/diff/18034/chrome/common/extensions/api/extension_api.cc#newcode292 chrome/common/extensions/api/extension_api.cc:292: RemovePrivilegedAPIs(result.get()); This logic is beautiful ;_; http://codereview.chromium.org/9460002/diff/18034/chrome/common/extensions/api/extension_api.cc#newcode298 chrome/common/extensions/api/extension_api.cc:298: for ...
8 years, 9 months ago (2012-03-06 04:06:57 UTC) #12
Aaron Boodman
lgtm http://codereview.chromium.org/9460002/diff/18034/chrome/renderer/extensions/extension_dispatcher.cc File chrome/renderer/extensions/extension_dispatcher.cc (right): http://codereview.chromium.org/9460002/diff/18034/chrome/renderer/extensions/extension_dispatcher.cc#newcode691 chrome/renderer/extensions/extension_dispatcher.cc:691: return Feature::UNPRIVILEGED_CONTEXT; On 2012/03/06 03:53:00, kalman wrote: > ...
8 years, 9 months ago (2012-03-06 08:18:12 UTC) #13
not at google - send to devlin
Rebasing now. http://codereview.chromium.org/9460002/diff/18034/chrome/common/extensions/api/extension_api.cc File chrome/common/extensions/api/extension_api.cc (right): http://codereview.chromium.org/9460002/diff/18034/chrome/common/extensions/api/extension_api.cc#newcode292 chrome/common/extensions/api/extension_api.cc:292: RemovePrivilegedAPIs(result.get()); On 2012/03/06 04:06:58, koz wrote: > ...
8 years, 9 months ago (2012-03-06 11:36:46 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kalman@chromium.org/9460002/41001
8 years, 9 months ago (2012-03-09 05:12:55 UTC) #15
commit-bot: I haz the power
Change committed as 125811
8 years, 9 months ago (2012-03-09 06:38:56 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kalman@chromium.org/9460002/44001
8 years, 9 months ago (2012-03-17 23:14:17 UTC) #17
commit-bot: I haz the power
Change committed as 127391
8 years, 9 months ago (2012-03-18 02:05:27 UTC) #18
not at google - send to devlin
koz/aa: PTAL. Koz is up-to-date with where this patch is now because we discussed it ...
8 years, 9 months ago (2012-03-20 03:32:13 UTC) #19
koz (OOO until 15th September)
lgtm https://chromiumcodereview.appspot.com/9460002/diff/44001/chrome/renderer/extensions/schema_generated_bindings.cc File chrome/renderer/extensions/schema_generated_bindings.cc (right): https://chromiumcodereview.appspot.com/9460002/diff/44001/chrome/renderer/extensions/schema_generated_bindings.cc#newcode121 chrome/renderer/extensions/schema_generated_bindings.cc:121: // TODO(kalman): can we just cache this in ...
8 years, 9 months ago (2012-03-20 04:43:05 UTC) #20
not at google - send to devlin
https://chromiumcodereview.appspot.com/9460002/diff/44001/chrome/renderer/extensions/schema_generated_bindings.cc File chrome/renderer/extensions/schema_generated_bindings.cc (right): https://chromiumcodereview.appspot.com/9460002/diff/44001/chrome/renderer/extensions/schema_generated_bindings.cc#newcode121 chrome/renderer/extensions/schema_generated_bindings.cc:121: // TODO(kalman): can we just cache this in the ...
8 years, 9 months ago (2012-03-20 07:02:05 UTC) #21
koz (OOO until 15th September)
https://chromiumcodereview.appspot.com/9460002/diff/44001/chrome/renderer/extensions/schema_generated_bindings.cc File chrome/renderer/extensions/schema_generated_bindings.cc (right): https://chromiumcodereview.appspot.com/9460002/diff/44001/chrome/renderer/extensions/schema_generated_bindings.cc#newcode121 chrome/renderer/extensions/schema_generated_bindings.cc:121: // TODO(kalman): can we just cache this in the ...
8 years, 9 months ago (2012-03-20 23:04:18 UTC) #22
not at google - send to devlin
Ok, I've made those damn tests pass. Going to try submitting this again and see ...
8 years, 9 months ago (2012-03-21 02:20:57 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kalman@chromium.org/9460002/62001
8 years, 9 months ago (2012-03-21 02:21:18 UTC) #24
commit-bot: I haz the power
8 years, 9 months ago (2012-03-21 04:09:25 UTC) #25
Change committed as 127899

Powered by Google App Engine
This is Rietveld 408576698