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

Issue 6961027: Change event routers from singletons to being owned by the ExtensionService. (Closed)

Created:
9 years, 7 months ago by Yoyo Zhou
Modified:
9 years, 7 months ago
CC:
chromium-reviews, Erik does not do reviews, achuith+watch_chromium.org, Aaron Boodman, rginda+watch_chromium.org, pam+watch_chromium.org, davemoore+watch_chromium.org, Miranda Callahan
Visibility:
Public.

Description

Change event routers from singletons to being owned by the ExtensionService. ExtensionService is in turn owned by the Profile. Also stop pretending that each event router observes more than one profile. (To support multi-profile, each profile would have its own ExtensionService and routers.) BUG=81745 TEST=covered by existing tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=86750

Patch Set 1 #

Patch Set 2 : merge to head #

Patch Set 3 : asargent and dmazzoni's comments #

Total comments: 9

Patch Set 4 : uninlining 'structors #

Patch Set 5 : fixes for ChromeOS #

Total comments: 2

Patch Set 6 : unittest doesn't pass yet #

Patch Set 7 : fix a11y test #

Patch Set 8 : all is built on sand #

Unified diffs Side-by-side diffs Delta from patch set Stats (+192 lines, -229 lines) Patch
M chrome/browser/chromeos/extensions/file_browser_event_router.h View 1 2 3 2 chunks +4 lines, -8 lines 0 comments Download
M chrome/browser/chromeos/extensions/file_browser_event_router.cc View 1 2 3 2 chunks +13 lines, -24 lines 0 comments Download
M chrome/browser/chromeos/login/wizard_accessibility_helper.cc View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_accessibility_api.h View 1 2 3 chunks +3 lines, -10 lines 0 comments Download
M chrome/browser/extensions/extension_accessibility_api.cc View 1 2 3 chunks +8 lines, -11 lines 0 comments Download
M chrome/browser/extensions/extension_bookmarks_module.h View 1 2 3 4 5 6 7 3 chunks +4 lines, -11 lines 0 comments Download
M chrome/browser/extensions/extension_bookmarks_module.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -13 lines 0 comments Download
M chrome/browser/extensions/extension_cookies_api.h View 1 2 3 2 chunks +2 lines, -8 lines 0 comments Download
M chrome/browser/extensions/extension_cookies_api.cc View 1 2 3 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/extensions/extension_event_router.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_history_api.h View 1 2 3 4 5 6 7 2 chunks +7 lines, -13 lines 0 comments Download
M chrome/browser/extensions/extension_history_api.cc View 1 2 3 1 chunk +20 lines, -30 lines 0 comments Download
M chrome/browser/extensions/extension_management_api.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -9 lines 0 comments Download
M chrome/browser/extensions/extension_management_api.cc View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/extensions/extension_preference_api.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_preference_api.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_processes_api.h View 1 2 3 chunks +7 lines, -11 lines 0 comments Download
M chrome/browser/extensions/extension_processes_api.cc View 1 2 2 chunks +7 lines, -15 lines 0 comments Download
M chrome/browser/extensions/extension_service.h View 1 3 chunks +27 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_service.cc View 1 2 3 4 1 chunk +18 lines, -17 lines 0 comments Download
M chrome/browser/extensions/extension_webnavigation_api.h View 1 2 3 2 chunks +2 lines, -10 lines 0 comments Download
M chrome/browser/extensions/extension_webnavigation_api.cc View 1 2 3 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/accessibility_event_router_views.h View 1 2 3 4 5 6 3 chunks +11 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/accessibility_event_router_views.cc View 1 2 3 4 5 6 7 chunks +25 lines, -10 lines 0 comments Download
M chrome/browser/ui/views/accessibility_event_router_views_unittest.cc View 1 2 3 4 5 6 3 chunks +13 lines, -8 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Yoyo Zhou
9 years, 7 months ago (2011-05-20 19:27:08 UTC) #1
asargent_no_longer_on_chrome
The change looks great in general. The only think I think needs fixing is that ...
9 years, 7 months ago (2011-05-20 21:03:34 UTC) #2
Yoyo Zhou
On 2011/05/20 21:03:34, Antony Sargent wrote: > The change looks great in general. The only ...
9 years, 7 months ago (2011-05-20 21:55:25 UTC) #3
Yoyo Zhou
I addressed your comments, and also made some necessary changes for accessibility in views (+dmazzoni ...
9 years, 7 months ago (2011-05-24 17:11:15 UTC) #4
asargent_no_longer_on_chrome
A few nits. Also you should change the "TEST=" line to be something like "TEST=Should ...
9 years, 7 months ago (2011-05-24 18:18:00 UTC) #5
dmazzoni
LGTM for *accessibility*. Thanks. http://codereview.chromium.org/6961027/diff/4001/chrome/browser/ui/views/accessibility_event_router_views.cc File chrome/browser/ui/views/accessibility_event_router_views.cc (right): http://codereview.chromium.org/6961027/diff/4001/chrome/browser/ui/views/accessibility_event_router_views.cc#newcode50 chrome/browser/ui/views/accessibility_event_router_views.cc:50: // We check if accessibility ...
9 years, 7 months ago (2011-05-24 18:19:52 UTC) #6
Yoyo Zhou
On 2011/05/24 18:19:52, Dominic Mazzoni wrote: > LGTM for *accessibility*. Thanks. FYI, I found another ...
9 years, 7 months ago (2011-05-24 19:17:29 UTC) #7
Yoyo Zhou
I updated the TEST= description. http://codereview.chromium.org/6961027/diff/4001/chrome/browser/chromeos/extensions/file_browser_event_router.cc File chrome/browser/chromeos/extensions/file_browser_event_router.cc (right): http://codereview.chromium.org/6961027/diff/4001/chrome/browser/chromeos/extensions/file_browser_event_router.cc#newcode62 chrome/browser/chromeos/extensions/file_browser_event_router.cc:62: } On 2011/05/24 18:18:00, ...
9 years, 7 months ago (2011-05-24 19:17:55 UTC) #8
dmazzoni
On Tue, May 24, 2011 at 12:17 PM, <yoz@chromium.org> wrote: > On 2011/05/24 18:19:52, Dominic ...
9 years, 7 months ago (2011-05-24 19:27:20 UTC) #9
asargent_no_longer_on_chrome
LGTM http://codereview.chromium.org/6961027/diff/7002/chrome/browser/extensions/extension_preference_api.cc File chrome/browser/extensions/extension_preference_api.cc (right): http://codereview.chromium.org/6961027/diff/7002/chrome/browser/extensions/extension_preference_api.cc#newcode202 chrome/browser/extensions/extension_preference_api.cc:202: Profile* profile) : profile_(profile) { did you mean ...
9 years, 7 months ago (2011-05-24 19:53:31 UTC) #10
Yoyo Zhou
Okay, I've painted myself into a corner. In accessibility_event_router_views_unittest.cc, we try to SetAccesibilityEnabled(true) on the ...
9 years, 7 months ago (2011-05-25 00:48:46 UTC) #11
dmazzoni
If the only problem is the unit test and the code otherwise looks fine, I'd ...
9 years, 7 months ago (2011-05-25 01:13:48 UTC) #12
asargent_no_longer_on_chrome
Dominic's suggestion seems fine to me. If that seems troublesome, another possibility you could look ...
9 years, 7 months ago (2011-05-25 04:52:14 UTC) #13
Yoyo Zhou
On 2011/05/25 04:52:14, Antony Sargent wrote: > Dominic's suggestion seems fine to me. If that ...
9 years, 7 months ago (2011-05-25 06:16:12 UTC) #14
Yoyo Zhou
I've implemented Dominic's suggestion. It's not quite that clean since the override value has to ...
9 years, 7 months ago (2011-05-25 19:33:05 UTC) #15
dmazzoni
LGTM. Yeah, slightly uglier with two booleans but still preferable to adding lots of infrastructure ...
9 years, 7 months ago (2011-05-25 20:17:39 UTC) #16
commit-bot: I haz the power
9 years, 7 months ago (2011-05-26 00:09:52 UTC) #17
Change committed as 86750

Powered by Google App Engine
This is Rietveld 408576698