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

Issue 10694085: Refactor extension event distribution to use Values instead of JSON strings. (Closed)

Created:
8 years, 5 months ago by Garret Kelly
Modified:
8 years, 4 months ago
CC:
chromium-reviews, mihaip-chromium-reviews_chromium.org, oshima+watch_chromium.org, nkostylev+watch_chromium.org, hashimoto+watch_chromium.org, aboxhall+watch_chromium.org, yoshiki+watch_chromium.org, yuzo+watch_chromium.org, davidbarr+watch_chromium.org, Aaron Boodman, Satish, darin-cc_chromium.org, dmazzoni+watch_chromium.org, dtseng+watch_chromium.org, brettw-cc_chromium.org, ctguil+watch_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, zork+watch_chromium.org, Primiano Tucci (use gerrit)
Visibility:
Public.

Description

Refactor extension event distribution to use Values instead of JSON strings. Also renames Event.dispatchJSON to Event.dispatch and removes all JSON serialization surrounding invocations of DispatchEvent variants. BUG=136045 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=150460

Patch Set 1 #

Patch Set 2 : Presubmit fixes. #

Patch Set 3 : Re-upload #

Patch Set 4 : Build fix. #

Total comments: 12

Patch Set 5 : Rebase and review changes. #

Total comments: 19

Patch Set 6 : Switching to scoped_ptrs. Addressing ownership problem that asargent pointed out. #

Patch Set 7 : Rebase. #

Patch Set 8 : unit_tests passing. #

Patch Set 9 : Rebase + passing. #

Patch Set 10 : Fixing memory leak in a test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+687 lines, -837 lines) Patch
M chrome/browser/accessibility/accessibility_extension_api.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/accessibility/accessibility_extension_api.cc View 1 2 3 4 5 6 2 chunks +23 lines, -23 lines 0 comments Download
M chrome/browser/bookmarks/bookmark_extension_api.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/bookmarks/bookmark_extension_api.cc View 1 2 3 4 5 6 7 8 9 7 chunks +31 lines, -44 lines 0 comments Download
M chrome/browser/bookmarks/bookmark_manager_extension_api.h View 1 2 3 4 5 3 chunks +3 lines, -5 lines 0 comments Download
M chrome/browser/bookmarks/bookmark_manager_extension_api.cc View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -8 lines 0 comments Download
M chrome/browser/chromeos/extensions/bluetooth_event_router.cc View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -10 lines 0 comments Download
M chrome/browser/chromeos/extensions/file_browser_event_router.cc View 1 2 3 4 5 6 7 8 9 8 chunks +20 lines, -33 lines 0 comments Download
M chrome/browser/chromeos/extensions/file_handler_util.cc View 1 2 3 4 5 6 7 8 3 chunks +2 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/extensions/input_method_event_router.cc View 1 2 3 4 5 6 1 chunk +4 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/extensions/media_player_event_router.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/alarms/alarm_manager.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -5 lines 0 comments Download
M chrome/browser/extensions/api/api_resource_event_notifier.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/app/app_api.cc View 1 2 3 4 5 6 2 chunks +11 lines, -14 lines 0 comments Download
M chrome/browser/extensions/api/cookies/cookies_api.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/cookies/cookies_api.cc View 1 2 3 4 5 6 2 chunks +8 lines, -10 lines 0 comments Download
M chrome/browser/extensions/api/debugger/debugger_api.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/extensions/api/downloads/downloads_api.cc View 1 2 3 4 5 6 1 chunk +5 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/idle/idle_api.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -5 lines 0 comments Download
M chrome/browser/extensions/api/input_ime/input_ime_api.cc View 1 2 3 4 5 6 7 8 6 chunks +30 lines, -46 lines 0 comments Download
M chrome/browser/extensions/api/managed_mode/managed_mode_api.cc View 1 2 3 4 5 6 1 chunk +4 lines, -5 lines 0 comments Download
M chrome/browser/extensions/api/management/management_api.cc View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -7 lines 0 comments Download
M chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.cc View 1 2 3 4 5 6 1 chunk +5 lines, -7 lines 0 comments Download
M chrome/browser/extensions/api/omnibox/omnibox_api.cc View 1 2 3 4 5 6 7 8 9 4 chunks +12 lines, -14 lines 0 comments Download
M chrome/browser/extensions/api/proxy/proxy_api.cc View 1 2 3 4 5 6 3 chunks +8 lines, -14 lines 0 comments Download
M chrome/browser/extensions/api/push_messaging/push_messaging_api.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/runtime/runtime_api.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/terminal/terminal_private_api.cc View 1 2 3 4 5 6 1 chunk +5 lines, -8 lines 0 comments Download
M chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc View 1 2 3 4 5 6 13 chunks +25 lines, -27 lines 0 comments Download
M chrome/browser/extensions/api/web_request/web_request_api.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -5 lines 0 comments Download
M chrome/browser/extensions/api/web_request/web_request_api_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -10 lines 0 comments Download
M chrome/browser/extensions/browser_event_router.h View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -6 lines 0 comments Download
M chrome/browser/extensions/browser_event_router.cc View 1 2 3 4 5 6 7 8 13 chunks +61 lines, -90 lines 0 comments Download
M chrome/browser/extensions/event_listener_map_unittest.cc View 1 2 3 4 5 6 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/extensions/event_router.h View 1 2 3 4 5 6 7 8 8 chunks +26 lines, -44 lines 0 comments Download
M chrome/browser/extensions/event_router.cc View 1 2 3 4 5 6 7 8 10 chunks +53 lines, -84 lines 0 comments Download
M chrome/browser/extensions/event_router_forwarder.h View 1 2 3 4 5 6 7 chunks +7 lines, -6 lines 0 comments Download
M chrome/browser/extensions/event_router_forwarder.cc View 1 2 3 4 5 6 6 chunks +16 lines, -15 lines 0 comments Download
M chrome/browser/extensions/event_router_forwarder_unittest.cc View 1 2 3 4 5 6 12 chunks +94 lines, -65 lines 0 comments Download
M chrome/browser/extensions/extension_devtools_bridge.cc View 1 2 3 4 5 6 7 8 3 chunks +11 lines, -5 lines 0 comments Download
M chrome/browser/extensions/extension_messages_apitest.cc View 1 2 3 4 5 6 3 chunks +15 lines, -4 lines 0 comments Download
M chrome/browser/extensions/extension_preference_helpers.cc View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extension_processes_api.h View 1 2 3 4 5 2 chunks +7 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_processes_api.cc View 1 2 3 4 5 6 7 8 7 chunks +30 lines, -39 lines 0 comments Download
M chrome/browser/extensions/menu_manager.cc View 1 2 3 4 5 6 7 8 9 3 chunks +6 lines, -8 lines 0 comments Download
M chrome/browser/extensions/menu_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 4 chunks +25 lines, -21 lines 0 comments Download
M chrome/browser/extensions/permissions_updater.cc View 1 2 3 4 5 6 1 chunk +3 lines, -5 lines 0 comments Download
M chrome/browser/extensions/settings/settings_frontend.cc View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -7 lines 0 comments Download
M chrome/browser/extensions/system/system_api.cc View 1 2 3 4 5 6 3 chunks +10 lines, -14 lines 0 comments Download
M chrome/browser/extensions/window_event_router.h View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/window_event_router.cc View 1 2 3 4 5 6 7 8 4 chunks +14 lines, -20 lines 0 comments Download
M chrome/browser/history/history_extension_api.h View 1 2 3 4 5 6 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/history/history_extension_api.cc View 1 2 3 4 5 6 2 chunks +7 lines, -10 lines 0 comments Download
M chrome/browser/speech/extension_api/tts_engine_extension_api.cc View 1 2 3 4 5 6 2 chunks +7 lines, -8 lines 0 comments Download
M chrome/browser/speech/extension_api/tts_extension_api_controller.cc View 1 2 3 4 5 6 2 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/speech/speech_input_extension_manager.h View 1 2 3 4 5 2 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/speech/speech_input_extension_manager.cc View 1 2 3 4 5 6 7 8 5 chunks +10 lines, -26 lines 0 comments Download
M chrome/renderer/extensions/dispatcher.cc View 1 2 3 4 5 6 7 8 9 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/renderer/resources/extensions/event.js View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -11 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
Garret Kelly
8 years, 5 months ago (2012-07-04 21:19:31 UTC) #1
bryeung
Just nits: this looks like a great change. https://chromiumcodereview.appspot.com/10694085/diff/8002/chrome/browser/extensions/api/downloads/downloads_api.cc File chrome/browser/extensions/api/downloads/downloads_api.cc (right): https://chromiumcodereview.appspot.com/10694085/diff/8002/chrome/browser/extensions/api/downloads/downloads_api.cc#newcode1085 chrome/browser/extensions/api/downloads/downloads_api.cc:1085: base::ListValue ...
8 years, 5 months ago (2012-07-09 15:12:08 UTC) #2
Garret Kelly
@rsleevi, would you mind taking a look at the speech_input_extension_manager.cc change to see if that ...
8 years, 5 months ago (2012-07-09 15:32:28 UTC) #3
bryeung
lgtm
8 years, 5 months ago (2012-07-09 15:46:38 UTC) #4
Ryan Sleevi
Hi Garret, I haven't worked on this code, beyond possibly cleaning up RefCounting issues. I ...
8 years, 5 months ago (2012-07-09 17:14:37 UTC) #5
asargent_no_longer_on_chrome
https://chromiumcodereview.appspot.com/10694085/diff/18002/chrome/browser/extensions/extension_event_router.cc File chrome/browser/extensions/extension_event_router.cc (right): https://chromiumcodereview.appspot.com/10694085/diff/18002/chrome/browser/extensions/extension_event_router.cc#newcode87 chrome/browser/extensions/extension_event_router.cc:87: // ensure that args' destruction doesn't result in event_args' ...
8 years, 5 months ago (2012-07-09 18:51:50 UTC) #6
Garret Kelly
> In the header documentation you specify that this method takes ownership of > event_args, ...
8 years, 5 months ago (2012-07-09 19:18:39 UTC) #7
asargent_no_longer_on_chrome
> > >> The ExtensionEvent structure has scoped_ptrs for both the event_args and > cross_incognito_args. ...
8 years, 5 months ago (2012-07-10 22:00:19 UTC) #8
miket_OOO
I made it to the end! LGTM as long as ownership is straightened out. From ...
8 years, 5 months ago (2012-07-10 22:33:19 UTC) #9
sky
https://chromiumcodereview.appspot.com/10694085/diff/18002/chrome/browser/extensions/extension_event_router.h File chrome/browser/extensions/extension_event_router.h (right): https://chromiumcodereview.appspot.com/10694085/diff/18002/chrome/browser/extensions/extension_event_router.h#newcode59 chrome/browser/extensions/extension_event_router.h:59: base::ListValue* event_args, Did you consider making this take a ...
8 years, 5 months ago (2012-07-16 22:29:01 UTC) #10
sky
On 2012/07/16 22:29:01, sky wrote: > https://chromiumcodereview.appspot.com/10694085/diff/18002/chrome/browser/extensions/extension_event_router.h > File chrome/browser/extensions/extension_event_router.h (right): > > https://chromiumcodereview.appspot.com/10694085/diff/18002/chrome/browser/extensions/extension_event_router.h#newcode59 > ...
8 years, 5 months ago (2012-07-16 22:33:02 UTC) #11
Garret Kelly
> Another option is to use scoped_ptr as the argument (forgot about that ability). > ...
8 years, 5 months ago (2012-07-16 22:35:32 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gdk@chromium.org/10694085/47005
8 years, 4 months ago (2012-08-07 22:07:18 UTC) #13
commit-bot: I haz the power
Failed to apply patch for chrome/browser/bookmarks/bookmark_extension_api.cc: While running patch -p1 --forward --force; patching file chrome/browser/bookmarks/bookmark_extension_api.cc ...
8 years, 4 months ago (2012-08-07 22:07:32 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gdk@chromium.org/10694085/51007
8 years, 4 months ago (2012-08-07 22:14:34 UTC) #15
commit-bot: I haz the power
Presubmit check for 10694085-51007 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 4 months ago (2012-08-07 22:14:52 UTC) #16
sky
LGTM
8 years, 4 months ago (2012-08-07 22:18:11 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gdk@chromium.org/10694085/51007
8 years, 4 months ago (2012-08-07 22:18:43 UTC) #18
dmazzoni
LGTM for my directories
8 years, 4 months ago (2012-08-07 22:26:18 UTC) #19
commit-bot: I haz the power
8 years, 4 months ago (2012-08-07 23:58:18 UTC) #20
Change committed as 150460

Powered by Google App Engine
This is Rietveld 408576698