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

Issue 344433003: Prepare declarativeContent API for new script injection feature. Added Javascript types and functio… (Closed)

Created:
6 years, 6 months ago by Mark Dittmer
Modified:
6 years, 5 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, darin-cc_chromium.org, jam, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Prepare declarativeContent API for new script injection feature. Added Javascript types and functions, as well as C++ ContentAction that currently does nothing. BUG=377978 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284049

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Fix regression by setting up a ContentWatcher for every ContentRulesRegistry #

Patch Set 4 : Bind ContentScript and RequestContentScript to declarativeContent API #

Patch Set 5 : Add WatchedPagesRecipient as indicator for where to send ContentWatcher updates #

Patch Set 6 : Add note about what it means to revert RequestContentScript #

Total comments: 12

Patch Set 7 : Address first round review comments and fix test build failure #

Total comments: 4

Patch Set 8 : Get rid of ContentScript Javascript type; only RequestContentScript is needed #

Total comments: 2

Patch Set 9 : Add description to new Javascript events #

Total comments: 15

Patch Set 10 : Address minor issues: temporary collection as array, less typedef #

Patch Set 11 : Greatly simplified: Got rid of WatchedPagesRecipient and new event types #

Total comments: 6

Patch Set 12 : Clean up declarative_content.json and store RequestContentScript data in action object #

Total comments: 25

Patch Set 13 : Undo multiplicity of registries and content watchers. Address code review comments. #

Total comments: 14

Patch Set 14 : Implement fixes from comments and add unit tests #

Total comments: 4

Patch Set 15 : Update input validation patterns #

Total comments: 4

Patch Set 16 : Break input verification into if applicable, then validate #

Messages

Total messages: 27 (0 generated)
Mark Dittmer
Hey Fady, would you please take a first pass at this CL? I'll add Ben ...
6 years, 6 months ago (2014-06-19 14:48:50 UTC) #1
Fady Samuel
An initial set of comments. https://codereview.chromium.org/344433003/diff/80002/chrome/browser/extensions/api/declarative_content/content_action.cc File chrome/browser/extensions/api/declarative_content/content_action.cc (right): https://codereview.chromium.org/344433003/diff/80002/chrome/browser/extensions/api/declarative_content/content_action.cc#newcode98 chrome/browser/extensions/api/declarative_content/content_action.cc:98: class RequestContentScript : public ...
6 years, 6 months ago (2014-06-23 18:56:28 UTC) #2
Mark Dittmer
Addressed first round comments and fixed test build failure. Ben, could you please review this ...
6 years, 6 months ago (2014-06-24 14:14:19 UTC) #3
not at google - send to devlin
I made some comments on the schema, but I'd prefer Jeffrey to review this CL. ...
6 years, 6 months ago (2014-06-24 15:06:43 UTC) #4
Mark Dittmer
Got rid of ContentScript Javascript type; only need RequestContentScript. https://codereview.chromium.org/344433003/diff/110001/chrome/common/extensions/api/declarative_content.json File chrome/common/extensions/api/declarative_content.json (right): https://codereview.chromium.org/344433003/diff/110001/chrome/common/extensions/api/declarative_content.json#newcode69 chrome/common/extensions/api/declarative_content.json:69: ...
6 years, 6 months ago (2014-06-25 14:36:06 UTC) #5
not at google - send to devlin
schema lgtm but run it by Jeffrey too (and the C++ code of course) https://codereview.chromium.org/344433003/diff/130001/chrome/common/extensions/api/declarative_content.json ...
6 years, 6 months ago (2014-06-25 14:38:57 UTC) #6
Mark Dittmer
https://codereview.chromium.org/344433003/diff/130001/chrome/common/extensions/api/declarative_content.json File chrome/common/extensions/api/declarative_content.json (right): https://codereview.chromium.org/344433003/diff/130001/chrome/common/extensions/api/declarative_content.json#newcode113 chrome/common/extensions/api/declarative_content.json:113: "name": "onDocumentIdle", On 2014/06/25 14:38:57, kalman wrote: > please ...
6 years, 6 months ago (2014-06-26 17:23:24 UTC) #7
Jeffrey Yasskin
https://codereview.chromium.org/344433003/diff/150001/chrome/browser/extensions/api/declarative/rules_registry_service.cc File chrome/browser/extensions/api/declarative/rules_registry_service.cc (right): https://codereview.chromium.org/344433003/diff/150001/chrome/browser/extensions/api/declarative/rules_registry_service.cc#newcode96 chrome/browser/extensions/api/declarative/rules_registry_service.cc:96: typedef std::vector< std::pair<std::string, WatchedPagesRecipient> > For something with a ...
6 years, 5 months ago (2014-06-27 22:03:42 UTC) #8
Mark Dittmer
Added my thoughts to many comments. Any comments without reply will soon be replied as ...
6 years, 5 months ago (2014-06-30 11:50:35 UTC) #9
Mark Dittmer
Addressed remaining comments: "Done". https://codereview.chromium.org/344433003/diff/150001/chrome/browser/extensions/api/declarative/rules_registry_service.cc File chrome/browser/extensions/api/declarative/rules_registry_service.cc (right): https://codereview.chromium.org/344433003/diff/150001/chrome/browser/extensions/api/declarative/rules_registry_service.cc#newcode96 chrome/browser/extensions/api/declarative/rules_registry_service.cc:96: typedef std::vector< std::pair<std::string, WatchedPagesRecipient> > ...
6 years, 5 months ago (2014-06-30 12:34:03 UTC) #10
Mark Dittmer
Just uploaded simplified implementation without WatchedPagesRecipient and new event objects. kalman@ and/or jyasskin@, still need ...
6 years, 5 months ago (2014-07-08 11:21:32 UTC) #11
kenrb
ipc lgtm
6 years, 5 months ago (2014-07-08 15:19:36 UTC) #12
not at google - send to devlin
yeah Jeffrey is certainly the owner of the C++ code here so I'd rather he ...
6 years, 5 months ago (2014-07-08 15:25:59 UTC) #13
Mark Dittmer
Made API changes recommended by kalman@, and actually store RequestContentScript parameters in action object. https://codereview.chromium.org/344433003/diff/190001/chrome/common/extensions/api/declarative_content.json ...
6 years, 5 months ago (2014-07-10 15:53:58 UTC) #14
Jeffrey Yasskin
https://codereview.chromium.org/344433003/diff/150001/chrome/browser/extensions/api/declarative/rules_registry_service.cc File chrome/browser/extensions/api/declarative/rules_registry_service.cc (right): https://codereview.chromium.org/344433003/diff/150001/chrome/browser/extensions/api/declarative/rules_registry_service.cc#newcode128 chrome/browser/extensions/api/declarative/rules_registry_service.cc:128: content_rules_registry.get())); On 2014/06/30 11:50:35, Mark Dittmer wrote: > On ...
6 years, 5 months ago (2014-07-15 17:13:00 UTC) #15
Mark Dittmer
Implemented most comments from jyasskin@. A few comments back and one implementation deferred until I ...
6 years, 5 months ago (2014-07-15 18:32:43 UTC) #16
Jeffrey Yasskin
https://codereview.chromium.org/344433003/diff/210001/chrome/browser/extensions/api/declarative_content/content_action.cc File chrome/browser/extensions/api/declarative_content/content_action.cc (right): https://codereview.chromium.org/344433003/diff/210001/chrome/browser/extensions/api/declarative_content/content_action.cc#newcode143 chrome/browser/extensions/api/declarative_content/content_action.cc:143: bool AppendJSStringsToCPPStrings(const base::ListValue& append_strings, On 2014/07/15 18:32:42, Mark Dittmer ...
6 years, 5 months ago (2014-07-15 20:44:59 UTC) #17
Mark Dittmer
Applied comments, added unit tests, and set bad_message=true for errors. Jeffrey, could you please look ...
6 years, 5 months ago (2014-07-16 12:26:13 UTC) #18
not at google - send to devlin
apologies for the drive-by but I saw "bad_message" in a review comment. https://codereview.chromium.org/344433003/diff/230001/chrome/browser/extensions/api/declarative_content/content_action.cc File chrome/browser/extensions/api/declarative_content/content_action.cc ...
6 years, 5 months ago (2014-07-16 16:51:14 UTC) #19
Mark Dittmer
Fixed issues in drive-by review. Jeffrey, once you review the unit tests this CL should ...
6 years, 5 months ago (2014-07-16 19:40:46 UTC) #20
Jeffrey Yasskin
https://codereview.chromium.org/344433003/diff/270001/chrome/browser/extensions/api/declarative_content/content_action.cc File chrome/browser/extensions/api/declarative_content/content_action.cc (right): https://codereview.chromium.org/344433003/diff/270001/chrome/browser/extensions/api/declarative_content/content_action.cc#newcode179 chrome/browser/extensions/api/declarative_content/content_action.cc:179: !dict->HasKey(keys::kCss) || Use more if()s here. Chains of || ...
6 years, 5 months ago (2014-07-17 20:39:14 UTC) #21
Mark Dittmer
Broke input verification into if applicable, then validate. Will add new checks to tests when ...
6 years, 5 months ago (2014-07-17 23:58:15 UTC) #22
Jeffrey Yasskin
Thanks! LGTM.
6 years, 5 months ago (2014-07-17 23:59:26 UTC) #23
Mark Dittmer
The CQ bit was checked by markdittmer@chromium.org
6 years, 5 months ago (2014-07-18 00:03:27 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/markdittmer@chromium.org/344433003/290001
6 years, 5 months ago (2014-07-18 00:07:23 UTC) #25
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_rel on tryserver.chromium ...
6 years, 5 months ago (2014-07-18 04:27:02 UTC) #26
commit-bot: I haz the power
6 years, 5 months ago (2014-07-18 10:29:24 UTC) #27
Message was sent while issue was closed.
Change committed as 284049

Powered by Google App Engine
This is Rietveld 408576698