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

Issue 12517011: Added activity logging for ext APIs with custom bindings (Closed)

Created:
7 years, 9 months ago by felt
Modified:
7 years, 9 months ago
CC:
chromium-reviews, Aaron Boodman, darin-cc_chromium.org, chromium-apps-reviews_chromium.org, Eric
Visibility:
Public.

Description

Added activity logging for ext APIs with custom bindings The Activity Log wasn't catching chrome.* API calls if they went through custom bindings. This CL fixes that and adds a test case. BUG=39802 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=190571

Patch Set 1 #

Patch Set 2 : lint fix #

Total comments: 7

Patch Set 3 : Modified it to work with another CL that happened while I was working on it #

Total comments: 2

Patch Set 4 : Modified setHandleRequest to avoid double logging #

Total comments: 12

Patch Set 5 : Merged with conflicting change (RouteStaticFunction to RouteFunction) #

Patch Set 6 : Added a flag to sendRequest #

Patch Set 7 : Missed the removal of two booleans #

Total comments: 6

Patch Set 8 : Renamed some variables #

Total comments: 1

Patch Set 9 : typo #

Total comments: 6

Patch Set 10 : Added an earlier check for the IPC communication #

Total comments: 5

Patch Set 11 : removed constant left over from testing #

Patch Set 12 : Somehow a file got removed from Patchset 11 -- adding the file back in #

Patch Set 13 : Yet another file disappeared from the patchset #

Patch Set 14 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+222 lines, -7 lines) Patch
M chrome/browser/renderer_host/chrome_render_message_filter.h View 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/chrome_render_message_filter.cc View 1 2 3 4 5 6 7 8 9 4 chunks +41 lines, -1 line 0 comments Download
M chrome/chrome_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension_messages.h View 1 2 3 4 2 chunks +18 lines, -1 line 0 comments Download
A chrome/renderer/extensions/api_activity_logger.h View 1 2 11 12 1 chunk +37 lines, -0 lines 0 comments Download
A chrome/renderer/extensions/api_activity_logger.cc View 1 2 3 4 5 6 7 8 9 11 1 chunk +60 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/dom_activity_logger.h View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/renderer/resources/extensions/binding.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +20 lines, -4 lines 0 comments Download
M chrome/renderer/resources/extensions/send_request.js View 1 2 3 4 5 6 7 3 chunks +15 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/activity_log/manifest.json View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M chrome/test/data/extensions/activity_log/options.html View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/activity_log/options.js View 1 2 3 4 2 chunks +16 lines, -0 lines 0 comments Download

Messages

Total messages: 33 (0 generated)
felt
Hi Matt, Thanks for the tips on what was causing us to miss some logging ...
7 years, 9 months ago (2013-03-13 23:48:06 UTC) #1
Matt Perry
https://codereview.chromium.org/12517011/diff/1014/chrome/renderer/extensions/api_activity_logger.cc File chrome/renderer/extensions/api_activity_logger.cc (right): https://codereview.chromium.org/12517011/diff/1014/chrome/renderer/extensions/api_activity_logger.cc#newcode40 chrome/renderer/extensions/api_activity_logger.cc:40: scoped_ptr<V8ValueConverter> converter(V8ValueConverter::create()); converter->FromV8Value(args[2]) should work and return a ListValue. ...
7 years, 9 months ago (2013-03-14 20:32:31 UTC) #2
felt
https://codereview.chromium.org/12517011/diff/1014/chrome/renderer/extensions/api_activity_logger.cc File chrome/renderer/extensions/api_activity_logger.cc (right): https://codereview.chromium.org/12517011/diff/1014/chrome/renderer/extensions/api_activity_logger.cc#newcode40 chrome/renderer/extensions/api_activity_logger.cc:40: scoped_ptr<V8ValueConverter> converter(V8ValueConverter::create()); On 2013/03/14 20:32:31, Matt Perry wrote: > ...
7 years, 9 months ago (2013-03-15 00:04:47 UTC) #3
felt
FYI I also added a testcase for the double logging in options.js. On 2013/03/15 00:04:47, ...
7 years, 9 months ago (2013-03-15 00:14:33 UTC) #4
Matt Perry
After seeing how easy it is to get it wrong about whether sendRequest is called, ...
7 years, 9 months ago (2013-03-15 17:51:06 UTC) #5
felt
Yikes - I suppose I should have followed the call graphs for setIcon etc., but ...
7 years, 9 months ago (2013-03-15 20:03:51 UTC) #6
Matt Perry
It's definitely an easy mistake to make - I'm sure I've missed some of the ...
7 years, 9 months ago (2013-03-15 20:18:51 UTC) #7
felt
I added a variable to sendRequest. I assume that all of this code is single-threaded? ...
7 years, 9 months ago (2013-03-15 23:26:15 UTC) #8
Matt Perry
https://codereview.chromium.org/12517011/diff/61001/chrome/renderer/resources/extensions/binding.js File chrome/renderer/resources/extensions/binding.js (right): https://codereview.chromium.org/12517011/diff/61001/chrome/renderer/resources/extensions/binding.js#newcode315 chrome/renderer/resources/extensions/binding.js:315: sendRequestHandler.setRequestStatus(false); move this outside this block. https://codereview.chromium.org/12517011/diff/61001/chrome/renderer/resources/extensions/send_request.js File chrome/renderer/resources/extensions/send_request.js ...
7 years, 9 months ago (2013-03-15 23:33:21 UTC) #9
felt
Done https://codereview.chromium.org/12517011/diff/61001/chrome/renderer/resources/extensions/binding.js File chrome/renderer/resources/extensions/binding.js (right): https://codereview.chromium.org/12517011/diff/61001/chrome/renderer/resources/extensions/binding.js#newcode315 chrome/renderer/resources/extensions/binding.js:315: sendRequestHandler.setRequestStatus(false); On 2013/03/15 23:33:21, Matt Perry wrote: > ...
7 years, 9 months ago (2013-03-15 23:40:16 UTC) #10
Matt Perry
lgtm https://codereview.chromium.org/12517011/diff/3005/chrome/renderer/resources/extensions/binding.js File chrome/renderer/resources/extensions/binding.js (right): https://codereview.chromium.org/12517011/diff/3005/chrome/renderer/resources/extensions/binding.js#newcode316 chrome/renderer/resources/extensions/binding.js:316: sendRequestHandler.getCalledSendRequest(); clear
7 years, 9 months ago (2013-03-15 23:42:18 UTC) #11
felt
brettw@chromium.org - I need OWNERS for chrome/browser/renderer_host/chrome_render_message_filter.* thanks! On 2013/03/15 23:42:18, Matt Perry wrote: > ...
7 years, 9 months ago (2013-03-15 23:50:27 UTC) #12
brettw
LGTM
7 years, 9 months ago (2013-03-18 19:49:30 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/felt@chromium.org/12517011/72001
7 years, 9 months ago (2013-03-18 20:08:20 UTC) #14
commit-bot: I haz the power
Presubmit check for 12517011-72001 failed and returned exit status 1. INFO:root:Found 13 file(s). Running presubmit ...
7 years, 9 months ago (2013-03-18 20:08:26 UTC) #15
felt
Hi Chris, could you please review chrome/common/extensions/extension_messages.h? It is a very small addition. On 2013/03/18 ...
7 years, 9 months ago (2013-03-18 20:11:46 UTC) #16
palmer
https://codereview.chromium.org/12517011/diff/72001/chrome/common/extensions/extension_messages.h File chrome/common/extensions/extension_messages.h (right): https://codereview.chromium.org/12517011/diff/72001/chrome/common/extensions/extension_messages.h#newcode34 chrome/common/extensions/extension_messages.h:34: IPC_STRUCT_BEGIN(ExtensionHostMsg_APIAction_Params) This is a rich API; taking a DeepCopy ...
7 years, 9 months ago (2013-03-18 20:58:10 UTC) #17
felt
https://codereview.chromium.org/12517011/diff/72001/chrome/common/extensions/extension_messages.h File chrome/common/extensions/extension_messages.h (right): https://codereview.chromium.org/12517011/diff/72001/chrome/common/extensions/extension_messages.h#newcode34 chrome/common/extensions/extension_messages.h:34: IPC_STRUCT_BEGIN(ExtensionHostMsg_APIAction_Params) What are your concerns? Perhaps I can address ...
7 years, 9 months ago (2013-03-18 21:01:33 UTC) #18
palmer
What do you think, Justin? https://codereview.chromium.org/12517011/diff/72001/chrome/common/extensions/extension_messages.h File chrome/common/extensions/extension_messages.h (right): https://codereview.chromium.org/12517011/diff/72001/chrome/common/extensions/extension_messages.h#newcode34 chrome/common/extensions/extension_messages.h:34: IPC_STRUCT_BEGIN(ExtensionHostMsg_APIAction_Params) > What are ...
7 years, 9 months ago (2013-03-18 21:22:12 UTC) #19
jschuh
On 2013/03/18 21:22:12, Chris P. wrote: > What do you think, Justin? > > https://codereview.chromium.org/12517011/diff/72001/chrome/common/extensions/extension_messages.h ...
7 years, 9 months ago (2013-03-18 21:45:15 UTC) #20
felt
I added checks for the ActivityLog flag earlier in the IPC handling, for both this ...
7 years, 9 months ago (2013-03-18 23:34:19 UTC) #21
felt
Chris, Justin: are there any other changes you need at this point beyond the extra ...
7 years, 9 months ago (2013-03-20 05:22:47 UTC) #22
felt
Chris, Justin: ping :) On 2013/03/20 05:22:47, felt wrote: > Chris, Justin: are there any ...
7 years, 9 months ago (2013-03-21 17:49:18 UTC) #23
palmer
https://codereview.chromium.org/12517011/diff/49002/chrome/browser/renderer_host/chrome_render_message_filter.cc File chrome/browser/renderer_host/chrome_render_message_filter.cc (right): https://codereview.chromium.org/12517011/diff/49002/chrome/browser/renderer_host/chrome_render_message_filter.cc#newcode67 chrome/browser/renderer_host/chrome_render_message_filter.cc:67: // running on the wrong thread, re-dispatch from the ...
7 years, 9 months ago (2013-03-21 18:39:37 UTC) #24
felt
Fixed the nit, and I don't think the other change needs to be made? (Thanks ...
7 years, 9 months ago (2013-03-21 21:59:23 UTC) #25
palmer
lgtm https://codereview.chromium.org/12517011/diff/49002/chrome/browser/renderer_host/chrome_render_message_filter.cc File chrome/browser/renderer_host/chrome_render_message_filter.cc (right): https://codereview.chromium.org/12517011/diff/49002/chrome/browser/renderer_host/chrome_render_message_filter.cc#newcode67 chrome/browser/renderer_host/chrome_render_message_filter.cc:67: // running on the wrong thread, re-dispatch from ...
7 years, 9 months ago (2013-03-21 22:16:54 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/felt@chromium.org/12517011/103001
7 years, 9 months ago (2013-03-21 22:18:09 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/felt@chromium.org/12517011/120013
7 years, 9 months ago (2013-03-22 16:05:56 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/felt@chromium.org/12517011/120013
7 years, 9 months ago (2013-03-22 18:19:17 UTC) #29
commit-bot: I haz the power
Failed to apply patch for chrome/renderer/resources/extensions/binding.js: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 9 months ago (2013-03-22 18:19:20 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/felt@chromium.org/12517011/40002
7 years, 9 months ago (2013-03-25 23:00:49 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/felt@chromium.org/12517011/40002
7 years, 9 months ago (2013-03-26 06:51:19 UTC) #32
commit-bot: I haz the power
7 years, 9 months ago (2013-03-26 07:21:09 UTC) #33
Message was sent while issue was closed.
Change committed as 190571

Powered by Google App Engine
This is Rietveld 408576698