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

Issue 12277024: Notificaitons refactor step 2 (Closed)

Created:
7 years, 10 months ago by Dmitry Titov
Modified:
7 years, 10 months ago
CC:
chromium-reviews, Aaron Boodman, chromium-apps-reviews_chromium.org, stevenjb, dewittj, dharcourt
Visibility:
Public.

Description

Notifications refactor step 2. Moved notification_types.* from ui/notifications -> ui/message_center (ui/notifications is removed) Made message_center::Notification a class rather then a struct. Its lifetime is managed by NotificationList. Moved UnpackOptionalFields from NotificationList to Notification, it is a private member used in ctor. Removed 2-level collections (set<list>), now all notifications are stored in a std::list (the ScopedVector didn't work since it can't be sorted) Use stable sort() to figure out the order of notifications in popups and NotificationCenter. Changed order of notifications in NotificationListUnittest::MarkSinglePopupAsShown - need mukai@ to verify correctness. NotificationList::RemoveNotification is now void since its bool result was not used. In NotificationListUnittest, instead of /gtest.gyp:gtest_main include base.gyp:run_all_unittests to initialize ICU etc. BUG=174164 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=184581

Patch Set 1 #

Patch Set 2 : fix merge #

Patch Set 3 : moar build fixes #

Patch Set 4 : now unittest runs too #

Patch Set 5 : 2 typos #

Patch Set 6 : fix the remaining test #

Total comments: 33

Patch Set 7 : cr feedback #

Total comments: 6

Patch Set 8 : remove unused declaration #

Patch Set 9 : addressed latest nits #

Total comments: 16

Patch Set 10 : steven's feedback #

Total comments: 8

Patch Set 11 : more feedback from Steven #

Unified diffs Side-by-side diffs Delta from patch set Stats (+677 lines, -642 lines) Patch
M ash/shell/window_type_launcher.cc View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M ash/system/web_notification/web_notification_tray_unittest.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/notification/notification_api.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/notification/notification_api.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +48 lines, -19 lines 0 comments Download
M chrome/browser/notifications/message_center_notification_manager.cc View 1 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/notifications/notification.h View 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/notifications/notification.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/ash/balloon_view_ash.cc View 1 2 3 3 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/message_center/web_notification_tray_win_browsertest.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M ui/message_center/message_center.h View 2 chunks +2 lines, -2 lines 0 comments Download
M ui/message_center/message_center.cc View 4 chunks +7 lines, -6 lines 0 comments Download
M ui/message_center/message_center.gyp View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M ui/message_center/message_center_bubble.cc View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -4 lines 0 comments Download
M ui/message_center/message_center_tray_unittest.cc View 5 chunks +5 lines, -5 lines 0 comments Download
M ui/message_center/message_popup_bubble.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +19 lines, -19 lines 0 comments Download
M ui/message_center/message_simple_view.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +3 lines, -2 lines 0 comments Download
M ui/message_center/message_simple_view.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -5 lines 0 comments Download
M ui/message_center/message_view.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +8 lines, -7 lines 0 comments Download
M ui/message_center/message_view.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +28 lines, -20 lines 0 comments Download
M ui/message_center/notification.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +82 lines, -27 lines 0 comments Download
M ui/message_center/notification.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +79 lines, -4 lines 0 comments Download
M ui/message_center/notification_list.h View 1 2 3 4 5 6 7 8 8 chunks +32 lines, -32 lines 0 comments Download
M ui/message_center/notification_list.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +154 lines, -260 lines 0 comments Download
M ui/message_center/notification_list_unittest.cc View 1 2 3 4 5 6 8 chunks +86 lines, -82 lines 0 comments Download
A ui/message_center/notification_types.h View 1 1 chunk +46 lines, -0 lines 0 comments Download
A + ui/message_center/notification_types.cc View 1 2 chunks +3 lines, -7 lines 0 comments Download
M ui/message_center/notification_view.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -2 lines 0 comments Download
M ui/message_center/notification_view.cc View 1 2 3 4 5 6 7 8 9 10 11 chunks +38 lines, -36 lines 0 comments Download
D ui/notifications/OWNERS View 1 chunk +0 lines, -2 lines 0 comments Download
D ui/notifications/notification_types.h View 1 1 chunk +0 lines, -49 lines 0 comments Download
D ui/notifications/notification_types.cc View 1 1 chunk +0 lines, -27 lines 0 comments Download
M ui/ui.gyp View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Dmitry Titov
Adding dewittj aand stevenjb to Cc - but please chime in if you feel like ...
7 years, 10 months ago (2013-02-20 21:51:06 UTC) #1
Dmitry Titov
Sorry for large CL. Most of the files are only namespace change for NotificationTypes...
7 years, 10 months ago (2013-02-20 21:52:06 UTC) #2
Jun Mukai
https://codereview.chromium.org/12277024/diff/18001/chrome/browser/extensions/api/notification/notification_api.cc File chrome/browser/extensions/api/notification/notification_api.cc (right): https://codereview.chromium.org/12277024/diff/18001/chrome/browser/extensions/api/notification/notification_api.cc#newcode139 chrome/browser/extensions/api/notification/notification_api.cc:139: // If older notification runtime is used, MessageCenetr is ...
7 years, 10 months ago (2013-02-20 22:52:15 UTC) #3
dewittj
Do you think that a message center ought to have two NotificationLists? This might solve ...
7 years, 10 months ago (2013-02-20 23:47:53 UTC) #4
miket_OOO
lgtm https://codereview.chromium.org/12277024/diff/18001/chrome/browser/extensions/api/notification/notification_api.cc File chrome/browser/extensions/api/notification/notification_api.cc (right): https://codereview.chromium.org/12277024/diff/18001/chrome/browser/extensions/api/notification/notification_api.cc#newcode247 chrome/browser/extensions/api/notification/notification_api.cc:247: #endif // !defined(ENABLE_MESSAGE_CENTER) On 2013/02/20 23:47:54, dewittj wrote: ...
7 years, 10 months ago (2013-02-22 21:07:09 UTC) #5
Dmitry Titov
I've addressed feedback, Jun and Justin - PTAL? I've replaced the need for periodic resort ...
7 years, 10 months ago (2013-02-23 00:58:51 UTC) #6
Jun Mukai
lgtm with nits https://codereview.chromium.org/12277024/diff/20016/ui/message_center/notification_list.cc File ui/message_center/notification_list.cc (right): https://codereview.chromium.org/12277024/diff/20016/ui/message_center/notification_list.cc#newcode180 ui/message_center/notification_list.cc:180: return (dummy != notifications_.end()); variable name ...
7 years, 10 months ago (2013-02-23 01:19:09 UTC) #7
dewittj
lgtm
7 years, 10 months ago (2013-02-23 01:22:49 UTC) #8
Dmitry Titov
Sky, could you please do OWNERS look? Most files touched because of a file move ...
7 years, 10 months ago (2013-02-23 01:35:48 UTC) #9
sky
LGTM - feel free to TBR this sort of stuff
7 years, 10 months ago (2013-02-25 16:14:30 UTC) #10
stevenjb
Nice refactor, thanks. Just a couple of questions/concerns. https://codereview.chromium.org/12277024/diff/11042/ui/message_center/notification.h File ui/message_center/notification.h (right): https://codereview.chromium.org/12277024/diff/11042/ui/message_center/notification.h#newcode83 ui/message_center/notification.h:83: // ...
7 years, 10 months ago (2013-02-25 18:11:08 UTC) #11
Dmitry Titov
Thanks Steven, I've updated patch once more. https://codereview.chromium.org/12277024/diff/11042/ui/message_center/notification.h File ui/message_center/notification.h (right): https://codereview.chromium.org/12277024/diff/11042/ui/message_center/notification.h#newcode83 ui/message_center/notification.h:83: // very ...
7 years, 10 months ago (2013-02-25 23:21:14 UTC) #12
stevenjb
https://codereview.chromium.org/12277024/diff/11042/ui/message_center/notification_list.cc File ui/message_center/notification_list.cc (right): https://codereview.chromium.org/12277024/diff/11042/ui/message_center/notification_list.cc#newcode184 ui/message_center/notification_list.cc:184: iter != notifications_.end(); ++iter) { On 2013/02/25 23:21:15, Dmitry ...
7 years, 10 months ago (2013-02-25 23:55:56 UTC) #13
Dmitry Titov
https://codereview.chromium.org/12277024/diff/11042/ui/message_center/notification_list.cc File ui/message_center/notification_list.cc (right): https://codereview.chromium.org/12277024/diff/11042/ui/message_center/notification_list.cc#newcode184 ui/message_center/notification_list.cc:184: iter != notifications_.end(); ++iter) { On 2013/02/25 23:55:56, stevenjb ...
7 years, 10 months ago (2013-02-26 01:01:51 UTC) #14
stevenjb
lgtm
7 years, 10 months ago (2013-02-26 01:11:57 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dimich@chromium.org/12277024/23042
7 years, 10 months ago (2013-02-26 01:15:34 UTC) #16
commit-bot: I haz the power
7 years, 10 months ago (2013-02-26 04:42:45 UTC) #17
Message was sent while issue was closed.
Change committed as 184581

Powered by Google App Engine
This is Rietveld 408576698