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

Issue 6803012: Profile shouldn't own DesktopNotificationService. (Closed)

Created:
9 years, 8 months ago by Torne
Modified:
9 years, 7 months ago
CC:
chromium-reviews, Erik does not do reviews, jam, Aaron Boodman, pam+watch_chromium.org, Paweł Hajdan Jr., davemoore+watch_chromium.org
Visibility:
Public.

Description

Profile shouldn't own DesktopNotificationService. DesktopNotificationService is now owned by DesktopNotificationServiceFactory, using Profile as a key. This uses the ProfileKeyedService infrastructure originally created for ThemeServiceFactory. BUG=77155 TEST=existing tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=81399

Patch Set 1 #

Patch Set 2 : Handle TestingProfile usage nicely #

Patch Set 3 : Lint #

Total comments: 2

Patch Set 4 : New approach to test mocks #

Patch Set 5 : Rebased #

Patch Set 6 : Fix dependency manager unit test #

Total comments: 12

Patch Set 7 : Cosmetic fixes #

Patch Set 8 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+196 lines, -108 lines) Patch
M chrome/browser/chromeos/notifications/balloon_view.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/content_settings/content_settings_notification_provider.cc View 1 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/desktop_notification_handler.cc View 1 2 3 4 4 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/extensions/notifications_apitest.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/notifications/desktop_notification_service.h View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/notifications/desktop_notification_service.cc View 1 2 3 4 2 chunks +5 lines, -2 lines 0 comments Download
A chrome/browser/notifications/desktop_notification_service_factory.h View 1 2 3 4 5 6 1 chunk +39 lines, -0 lines 0 comments Download
A chrome/browser/notifications/desktop_notification_service_factory.cc View 1 2 3 4 5 6 1 chunk +44 lines, -0 lines 0 comments Download
M chrome/browser/notifications/desktop_notification_service_unittest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/notifications/notification_exceptions_table_model_unittest.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/notifications/notification_options_menu_model.cc View 1 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile.h View 2 chunks +0 lines, -4 lines 0 comments Download
M chrome/browser/profiles/profile.cc View 1 3 chunks +0 lines, -12 lines 0 comments Download
M chrome/browser/profiles/profile_dependency_manager_unittest.cc View 1 2 3 4 5 8 chunks +6 lines, -12 lines 0 comments Download
M chrome/browser/profiles/profile_impl.h View 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 2 chunks +0 lines, -10 lines 0 comments Download
M chrome/browser/profiles/profile_keyed_service_factory.h View 1 2 3 3 chunks +25 lines, -3 lines 0 comments Download
M chrome/browser/profiles/profile_keyed_service_factory.cc View 1 2 3 4 3 chunks +15 lines, -5 lines 0 comments Download
M chrome/browser/sync/glue/theme_util_unittest.cc View 1 2 3 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/themes/theme_service_factory.h View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/themes/theme_service_factory.cc View 1 2 3 2 chunks +2 lines, -5 lines 0 comments Download
M chrome/browser/ui/cocoa/notifications/balloon_controller.mm View 1 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/options/options_util.cc View 1 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/options/content_settings_handler.cc View 1 6 chunks +9 lines, -8 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/test/testing_profile.h View 1 2 3 4 5 4 chunks +0 lines, -5 lines 0 comments Download
M chrome/test/testing_profile.cc View 1 2 3 4 5 5 chunks +11 lines, -14 lines 0 comments Download
M content/browser/renderer_host/render_message_filter.cc View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M content/browser/tab_contents/tab_contents.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 17 (0 generated)
Torne
This service is much less problematic than CloudPrintProxyService :)
9 years, 8 months ago (2011-04-06 14:08:08 UTC) #1
Torne
On 2011/04/06 14:08:08, Torne wrote: > This service is much less problematic than CloudPrintProxyService :) ...
9 years, 8 months ago (2011-04-06 14:53:50 UTC) #2
Elliot Glaysher
On 2011/04/06 14:53:50, Torne wrote: > On 2011/04/06 14:08:08, Torne wrote: > > This service ...
9 years, 8 months ago (2011-04-06 17:32:00 UTC) #3
torne_google.com
I tried this and it doesn't work because the constructor/destructor for TestingProfile is not always ...
9 years, 8 months ago (2011-04-06 18:01:17 UTC) #4
Miranda Callahan
On 2011/04/06 18:01:17, Torne (Richard Coles) wrote: > I tried this and it doesn't work ...
9 years, 8 months ago (2011-04-06 19:08:02 UTC) #5
Torne
OK, this new approach seems to be working fine: have a unit-test only API which ...
9 years, 8 months ago (2011-04-08 11:36:34 UTC) #6
Miranda Callahan
On 2011/04/08 11:36:34, Torne wrote: > OK, this new approach seems to be working fine: ...
9 years, 8 months ago (2011-04-08 15:29:05 UTC) #7
Elliot Glaysher
http://codereview.chromium.org/6803012/diff/12005/chrome/browser/profiles/profile_keyed_service_factory.h File chrome/browser/profiles/profile_keyed_service_factory.h (right): http://codereview.chromium.org/6803012/diff/12005/chrome/browser/profiles/profile_keyed_service_factory.h#newcode29 chrome/browser/profiles/profile_keyed_service_factory.h:29: void set_factory_function(FactoryFunction factory) { factory_ = factory; } This ...
9 years, 8 months ago (2011-04-08 17:43:32 UTC) #8
Torne
http://codereview.chromium.org/6803012/diff/12005/chrome/browser/profiles/profile_keyed_service_factory.h File chrome/browser/profiles/profile_keyed_service_factory.h (right): http://codereview.chromium.org/6803012/diff/12005/chrome/browser/profiles/profile_keyed_service_factory.h#newcode29 chrome/browser/profiles/profile_keyed_service_factory.h:29: void set_factory_function(FactoryFunction factory) { factory_ = factory; } On ...
9 years, 8 months ago (2011-04-11 11:52:51 UTC) #9
Torne
OK, I've tried a new approach here: 1) I've moved ForceAssociationWith to the parent class ...
9 years, 8 months ago (2011-04-11 14:27:41 UTC) #10
Elliot Glaysher
On Mon, Apr 11, 2011 at 7:27 AM, <torne@chromium.org> wrote: > This should work unless ...
9 years, 8 months ago (2011-04-11 18:07:58 UTC) #11
Torne
Elliot, I had to change the way the ProfileDependencyManager unit test worked because creating a ...
9 years, 8 months ago (2011-04-12 10:47:35 UTC) #12
Avi (use Gerrit)
http://codereview.chromium.org/6803012/diff/14013/chrome/browser/notifications/desktop_notification_service_factory.cc File chrome/browser/notifications/desktop_notification_service_factory.cc (right): http://codereview.chromium.org/6803012/diff/14013/chrome/browser/notifications/desktop_notification_service_factory.cc#newcode29 chrome/browser/notifications/desktop_notification_service_factory.cc:29: {} Opening brace on previous line. http://codereview.chromium.org/6803012/diff/14013/chrome/browser/notifications/desktop_notification_service_factory.cc#newcode31 chrome/browser/notifications/desktop_notification_service_factory.cc:31: DesktopNotificationServiceFactory::~DesktopNotificationServiceFactory() ...
9 years, 8 months ago (2011-04-12 13:57:15 UTC) #13
Torne
New CL uploaded with the cosmetic changes; open to suggestions for a nicer way to ...
9 years, 8 months ago (2011-04-12 15:22:12 UTC) #14
Avi (use Gerrit)
Oh, right. LGTM
9 years, 8 months ago (2011-04-12 16:27:35 UTC) #15
Elliot Glaysher
On 2011/04/12 16:27:35, Avi wrote: > Oh, right. LGTM LGTM
9 years, 8 months ago (2011-04-12 17:31:00 UTC) #16
commit-bot: I haz the power
9 years, 8 months ago (2011-04-13 10:50:03 UTC) #17
Commit queue failed due to updated description.

Powered by Google App Engine
This is Rietveld 408576698