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

Issue 895803003: [Profiles] Remove the NotificationService from the ProfileInfoCache (Closed)

Created:
5 years, 10 months ago by noms (inactive)
Modified:
4 years, 8 months ago
CC:
chromium-reviews, dbeam+watch-ntp_chromium.org, tfarina, pedrosimonetti+watch_chromium.org, dbeam+watch-options_chromium.org, estade+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Profiles] Remove the NotificationService from the ProfileInfoCache This removes NOTIFICATION_PROFILE_CACHED_INFO_CHANGED and NOTIFICATION_PROFILE_CACHE_PICTURE_SAVED notifications from all the things. This is part of the long process of killing the NotificationService with fire. In particular, this ProfileInfoCache notification is terrible because it's incredibly generic, gets shouted out any time *anything* happens to *any* profile, and a bunch of things in Chrome listen to it, when in fact they care about very specific profile notifications (i.e. has a name been changed, has a user been added) BUG=454845 TEST=All tests should pass. Chrome shouldn't behave weirdly. Everyone should get a pony. Committed: https://crrev.com/75ca0190e37b841400182d657d44ee077180f792 Cr-Commit-Position: refs/heads/master@{#318178}

Patch Set 1 : #

Patch Set 2 : copy paste the right function #

Total comments: 8

Patch Set 3 : rebase #

Patch Set 4 : rachel and cait comments #

Patch Set 5 : maybe fix NTPLoginHandler tests #

Total comments: 2

Patch Set 6 : cait nit #

Total comments: 7

Patch Set 7 : rebase #

Patch Set 8 : clean up views code #

Total comments: 7

Patch Set 9 : s/public/protected/ #

Total comments: 2

Patch Set 10 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+312 lines, -298 lines) Patch
M chrome/browser/chrome_notification_types.h View 1 chunk +0 lines, -7 lines 0 comments Download
M chrome/browser/chromeos/profiles/profile_list_chromeos_unittest.cc View 3 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/jumplist_win.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -4 lines 0 comments Download
M chrome/browser/notifications/message_center_settings_controller.h View 1 2 3 4 chunks +13 lines, -1 line 0 comments Download
M chrome/browser/notifications/message_center_settings_controller.cc View 1 2 3 6 chunks +32 lines, -11 lines 0 comments Download
M chrome/browser/profiles/avatar_menu.h View 4 chunks +18 lines, -11 lines 0 comments Download
M chrome/browser/profiles/avatar_menu.cc View 1 2 4 chunks +39 lines, -9 lines 0 comments Download
M chrome/browser/profiles/profile_info_cache.h View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/profiles/profile_info_cache.cc View 1 2 3 4 5 6 7 8 9 10 chunks +8 lines, -41 lines 0 comments Download
M chrome/browser/profiles/profile_info_cache_observer.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/profiles/profile_info_cache_unittest.cc View 1 2 3 chunks +6 lines, -14 lines 0 comments Download
M chrome/browser/profiles/profile_list_desktop_unittest.cc View 2 chunks +5 lines, -7 lines 0 comments Download
M chrome/browser/profiles/profile_manager.cc View 1 2 3 4 5 6 2 chunks +0 lines, -8 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_non_client_frame_view.h View 1 2 3 4 5 6 7 8 2 chunks +16 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_non_client_frame_view.cc View 1 2 3 4 5 6 7 3 chunks +45 lines, -29 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/frame/glass_browser_frame_view.h View 1 2 3 4 5 6 7 8 4 chunks +4 lines, -11 lines 0 comments Download
M chrome/browser/ui/views/frame/glass_browser_frame_view.cc View 1 2 3 4 5 6 7 8 9 6 chunks +9 lines, -31 lines 0 comments Download
M chrome/browser/ui/views/frame/opaque_browser_frame_view.h View 1 2 3 4 5 6 7 8 5 chunks +3 lines, -10 lines 0 comments Download
M chrome/browser/ui/views/frame/opaque_browser_frame_view.cc View 1 2 3 4 5 6 7 8 9 5 chunks +8 lines, -33 lines 0 comments Download
M chrome/browser/ui/webui/ntp/ntp_login_handler.h View 3 chunks +5 lines, -9 lines 0 comments Download
M chrome/browser/ui/webui/ntp/ntp_login_handler.cc View 1 2 3 4 4 chunks +11 lines, -10 lines 0 comments Download
M chrome/browser/ui/webui/options/browser_options_handler.h View 1 2 3 4 5 6 7 8 9 3 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/options/browser_options_handler.cc View 1 2 3 4 5 6 7 8 9 5 chunks +25 lines, -5 lines 0 comments Download
M chrome/browser/ui/webui/options/manage_profile_handler.h View 3 chunks +9 lines, -6 lines 0 comments Download
M chrome/browser/ui/webui/options/manage_profile_handler.cc View 2 chunks +24 lines, -12 lines 0 comments Download
M chrome/browser/ui/webui/options/options_ui_browsertest.cc View 1 2 2 chunks +0 lines, -6 lines 0 comments Download

Messages

Total messages: 55 (24 generated)
noms (inactive)
Woohoo! I think I've removed the old notifications from the ProfileInfoCache, and Chrome is still ...
5 years, 10 months ago (2015-02-05 20:36:31 UTC) #13
Cait (Slow)
Notification bits look v. good! A couple clean-up comments inline. Also: from past battles with ...
5 years, 10 months ago (2015-02-06 16:47:22 UTC) #14
rpetterson
LGTM overall pretty good. just a couple of nits but none which should block checkin. ...
5 years, 10 months ago (2015-02-07 00:04:58 UTC) #15
rpetterson
I still vote for static functions ProfileInfoCache::AddObserver and ProfileInfoCache::RemoveObserver, but I'm not gonna fight you ...
5 years, 10 months ago (2015-02-11 08:47:10 UTC) #17
Cait (Slow)
Notifications bits LGTM https://codereview.chromium.org/895803003/diff/310001/chrome/browser/jumplist_win.h File chrome/browser/jumplist_win.h (right): https://codereview.chromium.org/895803003/diff/310001/chrome/browser/jumplist_win.h#newcode34 chrome/browser/jumplist_win.h:34: namespace content { nit: no need ...
5 years, 10 months ago (2015-02-11 16:24:30 UTC) #18
noms (inactive)
Adding owners while I address nits: dewittj: c/b/notifications sky: c/b/ui/views and the things directly under ...
5 years, 10 months ago (2015-02-12 21:46:02 UTC) #21
dewittj
c/b/notifications lgtm
5 years, 10 months ago (2015-02-12 21:52:14 UTC) #22
noms (inactive)
Scott and Dan: ping! :) https://codereview.chromium.org/895803003/diff/310001/chrome/browser/jumplist_win.h File chrome/browser/jumplist_win.h (right): https://codereview.chromium.org/895803003/diff/310001/chrome/browser/jumplist_win.h#newcode34 chrome/browser/jumplist_win.h:34: namespace content { On ...
5 years, 10 months ago (2015-02-17 15:37:25 UTC) #24
sky
https://codereview.chromium.org/895803003/diff/330001/chrome/browser/ui/views/frame/glass_browser_frame_view.cc File chrome/browser/ui/views/frame/glass_browser_frame_view.cc (right): https://codereview.chromium.org/895803003/diff/330001/chrome/browser/ui/views/frame/glass_browser_frame_view.cc#newcode588 chrome/browser/ui/views/frame/glass_browser_frame_view.cc:588: UpdateAvatar(this, NewAvatarButton::NATIVE_BUTTON); The new code for all this looks ...
5 years, 10 months ago (2015-02-19 15:59:36 UTC) #25
noms (inactive)
https://codereview.chromium.org/895803003/diff/330001/chrome/browser/ui/views/frame/glass_browser_frame_view.cc File chrome/browser/ui/views/frame/glass_browser_frame_view.cc (right): https://codereview.chromium.org/895803003/diff/330001/chrome/browser/ui/views/frame/glass_browser_frame_view.cc#newcode588 chrome/browser/ui/views/frame/glass_browser_frame_view.cc:588: UpdateAvatar(this, NewAvatarButton::NATIVE_BUTTON); On 2015/02/19 15:59:36, sky wrote: > The ...
5 years, 10 months ago (2015-02-19 16:07:20 UTC) #26
sky
https://codereview.chromium.org/895803003/diff/330001/chrome/browser/ui/views/frame/glass_browser_frame_view.cc File chrome/browser/ui/views/frame/glass_browser_frame_view.cc (right): https://codereview.chromium.org/895803003/diff/330001/chrome/browser/ui/views/frame/glass_browser_frame_view.cc#newcode606 chrome/browser/ui/views/frame/glass_browser_frame_view.cc:606: if (browser_view()->IsOffTheRecord() || !switches::IsNewAvatarMenu()) On 2015/02/19 16:07:19, Monica Dinculescu ...
5 years, 10 months ago (2015-02-19 16:09:18 UTC) #27
noms (inactive)
https://codereview.chromium.org/895803003/diff/330001/chrome/browser/ui/views/frame/glass_browser_frame_view.cc File chrome/browser/ui/views/frame/glass_browser_frame_view.cc (right): https://codereview.chromium.org/895803003/diff/330001/chrome/browser/ui/views/frame/glass_browser_frame_view.cc#newcode606 chrome/browser/ui/views/frame/glass_browser_frame_view.cc:606: if (browser_view()->IsOffTheRecord() || !switches::IsNewAvatarMenu()) On 2015/02/19 16:09:18, sky wrote: ...
5 years, 10 months ago (2015-02-19 16:11:49 UTC) #28
sky
If it makes sense for all subclasses, then definitely promote it. On Thu, Feb 19, ...
5 years, 10 months ago (2015-02-19 17:53:07 UTC) #29
noms
Hi Scott, Refactored ALL the things. I think everything is functionally the same, but cleaner. ...
5 years, 10 months ago (2015-02-20 21:24:34 UTC) #31
sky
Looking much cleaner! https://codereview.chromium.org/895803003/diff/370001/chrome/browser/ui/views/frame/browser_non_client_frame_view.h File chrome/browser/ui/views/frame/browser_non_client_frame_view.h (right): https://codereview.chromium.org/895803003/diff/370001/chrome/browser/ui/views/frame/browser_non_client_frame_view.h#newcode95 chrome/browser/ui/views/frame/browser_non_client_frame_view.h:95: void BrowserNonClientFrameView::UpdateTaskbarDecoration(); nuke BrowserNonClientFrameView::. https://codereview.chromium.org/895803003/diff/370001/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc File ...
5 years, 10 months ago (2015-02-20 21:43:20 UTC) #32
noms (inactive)
https://codereview.chromium.org/895803003/diff/370001/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc File chrome/browser/ui/views/frame/opaque_browser_frame_view.cc (right): https://codereview.chromium.org/895803003/diff/370001/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc#newcode189 chrome/browser/ui/views/frame/opaque_browser_frame_view.cc:189: UpdateNewStyleAvatarInfo(this, NewAvatarButton::THEMED_BUTTON); On 2015/02/20 21:43:19, sky wrote: > How ...
5 years, 10 months ago (2015-02-20 21:46:30 UTC) #33
sky
https://codereview.chromium.org/895803003/diff/370001/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc File chrome/browser/ui/views/frame/opaque_browser_frame_view.cc (right): https://codereview.chromium.org/895803003/diff/370001/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc#newcode189 chrome/browser/ui/views/frame/opaque_browser_frame_view.cc:189: UpdateNewStyleAvatarInfo(this, NewAvatarButton::THEMED_BUTTON); On 2015/02/20 21:46:30, Monica Dinculescu wrote: > ...
5 years, 10 months ago (2015-02-20 21:51:01 UTC) #34
noms
https://codereview.chromium.org/895803003/diff/370001/chrome/browser/ui/views/frame/browser_non_client_frame_view.h File chrome/browser/ui/views/frame/browser_non_client_frame_view.h (right): https://codereview.chromium.org/895803003/diff/370001/chrome/browser/ui/views/frame/browser_non_client_frame_view.h#newcode95 chrome/browser/ui/views/frame/browser_non_client_frame_view.h:95: void BrowserNonClientFrameView::UpdateTaskbarDecoration(); On 2015/02/20 21:43:19, sky wrote: > nuke ...
5 years, 10 months ago (2015-02-23 15:46:52 UTC) #36
sky
LGTM
5 years, 10 months ago (2015-02-23 15:56:54 UTC) #37
noms (inactive)
Dan: ping! :) Here's a cat-that-doesn't-fit-in-a-box gif for bribes: http://i.imgur.com/nGVvHZR.gif
5 years, 10 months ago (2015-02-23 16:09:52 UTC) #38
Dan Beam
https://codereview.chromium.org/895803003/diff/410001/chrome/browser/ui/webui/options/options_ui_browsertest.cc File chrome/browser/ui/webui/options/options_ui_browsertest.cc (left): https://codereview.chromium.org/895803003/diff/410001/chrome/browser/ui/webui/options/options_ui_browsertest.cc#oldcode249 chrome/browser/ui/webui/options/options_ui_browsertest.cc:249: wait_for_profile_deletion.Wait(); why is this not necessary now?
5 years, 10 months ago (2015-02-25 18:02:58 UTC) #39
noms (inactive)
https://codereview.chromium.org/895803003/diff/410001/chrome/browser/ui/webui/options/options_ui_browsertest.cc File chrome/browser/ui/webui/options/options_ui_browsertest.cc (left): https://codereview.chromium.org/895803003/diff/410001/chrome/browser/ui/webui/options/options_ui_browsertest.cc#oldcode249 chrome/browser/ui/webui/options/options_ui_browsertest.cc:249: wait_for_profile_deletion.Wait(); On 2015/02/25 18:02:58, Dan Beam wrote: > why ...
5 years, 10 months ago (2015-02-25 19:29:53 UTC) #40
Dan Beam
lgtm
5 years, 10 months ago (2015-02-25 20:20:17 UTC) #41
noms (inactive)
Thanks everyone!
5 years, 10 months ago (2015-02-25 20:21:05 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/895803003/410001
5 years, 10 months ago (2015-02-25 20:21:45 UTC) #44
commit-bot: I haz the power
Try jobs failed on following builders: android_aosp on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_aosp/builds/62161)
5 years, 10 months ago (2015-02-25 20:28:28 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/895803003/430001
5 years, 10 months ago (2015-02-25 22:38:10 UTC) #49
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_TIMED_OUT, no build URL) Timed out ...
5 years, 10 months ago (2015-02-26 00:39:28 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/895803003/430001
5 years, 10 months ago (2015-02-26 02:29:26 UTC) #53
commit-bot: I haz the power
Committed patchset #10 (id:430001)
5 years, 10 months ago (2015-02-26 03:14:41 UTC) #54
commit-bot: I haz the power
5 years, 10 months ago (2015-02-26 03:15:39 UTC) #55
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/75ca0190e37b841400182d657d44ee077180f792
Cr-Commit-Position: refs/heads/master@{#318178}

Powered by Google App Engine
This is Rietveld 408576698