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

Issue 1292003004: Elide origins displayed on web notifications. (Closed)

Created:
5 years, 4 months ago by Miguel Garcia
Modified:
5 years, 4 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, peter+watch_chromium.org, mlamouri+watch-notifications_chromium.org, extensions-reviews_chromium.org, Peter Beverloo, Peter Kasting
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Elide origins displayed on web notifications. WebPush displays notifications including the origin in the context message field. When such origin is too long it is now elided in a secure acceptable way. BUG=509834 Committed: https://crrev.com/53a6dde573f020d57b4fff5923f272f98da66e27 Cr-Commit-Position: refs/heads/master@{#344455}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Move origin_url to message_center::Notification #

Total comments: 2

Patch Set 3 : Remove the use_origin flag in Notification do everything in NotificationView #

Total comments: 9

Patch Set 4 : Move UseOriginAsContextMessage to Notification #

Total comments: 2

Patch Set 5 : Style nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+710 lines, -1033 lines) Patch
M ash/display/display_error_observer_chromeos.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download
M ash/display/resolution_notification_controller.cc View 1 1 chunk +5 lines, -9 lines 0 comments Download
M ash/shell/window_type_launcher.cc View 1 1 chunk +6 lines, -9 lines 0 comments Download
M ash/system/chromeos/bluetooth/bluetooth_notification_controller.cc View 1 3 chunks +22 lines, -33 lines 0 comments Download
M ash/system/chromeos/power/battery_notification.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ash/system/chromeos/power/tray_power.cc View 1 1 chunk +5 lines, -8 lines 0 comments Download
M ash/system/chromeos/screen_security/screen_capture_tray_item.cc View 1 1 chunk +6 lines, -10 lines 0 comments Download
M ash/system/chromeos/screen_security/screen_share_tray_item.cc View 1 1 chunk +6 lines, -10 lines 0 comments Download
M ash/system/chromeos/session/tray_session_length_limit.cc View 1 1 chunk +3 lines, -5 lines 0 comments Download
M ash/system/chromeos/tray_display.cc View 1 1 chunk +5 lines, -8 lines 0 comments Download
M ash/system/locale/locale_notification_controller.cc View 1 1 chunk +8 lines, -11 lines 0 comments Download
M ash/system/web_notification/web_notification_tray_unittest.cc View 1 2 chunks +8 lines, -14 lines 0 comments Download
M chrome/browser/chromeos/file_system_provider/notification_manager.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/first_run/drive_first_run_controller.cc View 1 1 chunk +4 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/net/network_portal_notification_controller.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/policy/consumer_management_notifier.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/power/peripheral_battery_observer.cc View 1 1 chunk +5 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/printer_detector/printer_detector.cc View 1 2 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/download/notification/download_group_notification.cc View 1 2 3 1 chunk +5 lines, -5 lines 0 comments Download
M chrome/browser/download/notification/download_item_notification.cc View 1 2 3 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/file_system/request_file_system_notification.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/api/notifications/notifications_api.cc View 1 2 1 chunk +6 lines, -12 lines 0 comments Download
M chrome/browser/extensions/extension_storage_monitor.cc View 1 1 chunk +10 lines, -14 lines 0 comments Download
M chrome/browser/local_discovery/privet_notifications.cc View 1 1 chunk +3 lines, -8 lines 0 comments Download
M chrome/browser/notifications/extension_welcome_notification.cc View 1 1 chunk +4 lines, -6 lines 0 comments Download
M chrome/browser/notifications/extension_welcome_notification_unittest.cc View 1 1 chunk +6 lines, -10 lines 0 comments Download
M chrome/browser/notifications/message_center_notifications_browsertest.cc View 1 1 chunk +8 lines, -12 lines 0 comments Download
M chrome/browser/notifications/notification.h View 1 3 chunks +1 line, -7 lines 0 comments Download
M chrome/browser/notifications/notification.cc View 1 3 chunks +3 lines, -6 lines 0 comments Download
M chrome/browser/notifications/notification_conversion_helper_unittest.cc View 1 2 1 chunk +3 lines, -8 lines 0 comments Download
M chrome/browser/notifications/platform_notification_service_browsertest.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/notifications/platform_notification_service_impl.h View 1 2 chunks +6 lines, -15 lines 0 comments Download
M chrome/browser/notifications/platform_notification_service_impl.cc View 1 2 3 chunks +8 lines, -41 lines 0 comments Download
M chrome/browser/notifications/platform_notification_service_unittest.cc View 1 2 5 chunks +71 lines, -60 lines 0 comments Download
M chrome/browser/search/hotword_service.cc View 1 1 chunk +3 lines, -7 lines 0 comments Download
M chrome/browser/signin/signin_error_notifier_ash.cc View 1 1 chunk +3 lines, -7 lines 0 comments Download
M chrome/browser/sync/sync_error_notifier_ash.cc View 1 1 chunk +1 line, -4 lines 0 comments Download
M chrome/browser/ui/ash/chrome_screenshot_grabber.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.cc View 1 2 chunks +1 line, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/notifications/message_center_tray_bridge_unittest.mm View 1 1 chunk +3 lines, -8 lines 0 comments Download
M ui/message_center/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M ui/message_center/DEPS View 1 1 chunk +1 line, -0 lines 0 comments Download
M ui/message_center/cocoa/notification_controller.mm View 1 2 3 4 5 chunks +26 lines, -11 lines 0 comments Download
M ui/message_center/cocoa/notification_controller_unittest.mm View 1 2 10 chunks +28 lines, -73 lines 0 comments Download
M ui/message_center/cocoa/popup_collection_unittest.mm View 1 9 chunks +52 lines, -113 lines 0 comments Download
M ui/message_center/cocoa/popup_controller_unittest.mm View 1 1 chunk +4 lines, -8 lines 0 comments Download
M ui/message_center/cocoa/tray_view_controller_unittest.mm View 1 5 chunks +21 lines, -56 lines 0 comments Download
M ui/message_center/message_center.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M ui/message_center/message_center_impl_unittest.cc View 1 7 chunks +63 lines, -127 lines 0 comments Download
M ui/message_center/message_center_style.h View 1 chunk +5 lines, -0 lines 0 comments Download
M ui/message_center/message_center_tray_unittest.cc View 1 3 chunks +19 lines, -30 lines 0 comments Download
M ui/message_center/notification.h View 1 2 3 5 chunks +16 lines, -1 line 0 comments Download
M ui/message_center/notification.cc View 1 2 3 8 chunks +18 lines, -13 lines 0 comments Download
M ui/message_center/notification_list_unittest.cc View 1 11 chunks +83 lines, -176 lines 0 comments Download
M ui/message_center/views/constants.h View 1 chunk +0 lines, -2 lines 0 comments Download
M ui/message_center/views/message_center_view_unittest.cc View 1 1 chunk +6 lines, -9 lines 0 comments Download
M ui/message_center/views/message_popup_collection_unittest.cc View 1 1 chunk +5 lines, -10 lines 0 comments Download
M ui/message_center/views/notification_view.h View 1 3 3 chunks +9 lines, -0 lines 0 comments Download
M ui/message_center/views/notification_view.cc View 1 2 3 6 chunks +22 lines, -7 lines 0 comments Download
M ui/message_center/views/notification_view_unittest.cc View 1 2 3 chunks +77 lines, -11 lines 0 comments Download

Messages

Total messages: 36 (7 generated)
Miguel Garcia
Thanks in advance for the review! Note that I have checked with ui/OWNERS to make ...
5 years, 4 months ago (2015-08-14 15:50:43 UTC) #2
Jun Mukai
Also, you may want to modify chrome/browser/notifications/notification_ui_manager_android.cc for the handling of origins. https://codereview.chromium.org/1292003004/diff/1/ui/message_center/DEPS File ui/message_center/DEPS ...
5 years, 4 months ago (2015-08-14 17:17:07 UTC) #3
Miguel Garcia
https://codereview.chromium.org/1292003004/diff/1/ui/message_center/notification.h File ui/message_center/notification.h (right): https://codereview.chromium.org/1292003004/diff/1/ui/message_center/notification.h#newcode36 ui/message_center/notification.h:36: struct MESSAGE_CENTER_EXPORT ContextMessage { On 2015/08/14 17:17:07, Jun Mukai ...
5 years, 4 months ago (2015-08-14 18:28:45 UTC) #4
Miguel Garcia
Jun, I thought about your suggestion and implemented something similar. I still think that the ...
5 years, 4 months ago (2015-08-17 17:27:55 UTC) #5
Jun Mukai
Also please consider the Ryan's comment in https://chromiumcodereview.appspot.com/1235253009/. You may want to move url_formatter into ...
5 years, 4 months ago (2015-08-17 18:36:15 UTC) #6
chromium-reviews
I checked with the ui/ owners (sadrul in particular) and the confirmed that components is ...
5 years, 4 months ago (2015-08-17 18:44:15 UTC) #7
Miguel Garcia
On 17 Aug 2015 7:44 pm, "Miguel Garcia" <miguelg@google.com> wrote: > I checked with the ...
5 years, 4 months ago (2015-08-17 18:44:47 UTC) #8
Miguel Garcia
Ok, new change uploaded. PTAL Here is a summary of the different open points we ...
5 years, 4 months ago (2015-08-18 16:04:13 UTC) #9
Miguel Garcia
https://chromiumcodereview.appspot.com/1292003004/diff/1/ui/message_center/DEPS File ui/message_center/DEPS (right): https://chromiumcodereview.appspot.com/1292003004/diff/1/ui/message_center/DEPS#newcode2 ui/message_center/DEPS:2: "+components/url_formatter/elide_url.h", On 2015/08/14 17:17:07, Jun Mukai wrote: > I ...
5 years, 4 months ago (2015-08-18 16:04:27 UTC) #10
Jun Mukai
https://chromiumcodereview.appspot.com/1292003004/diff/20001/ui/message_center/notification.h File ui/message_center/notification.h (right): https://chromiumcodereview.appspot.com/1292003004/diff/20001/ui/message_center/notification.h#newcode41 ui/message_center/notification.h:41: bool use_origin_as_context; I really want to eliminate this flag ...
5 years, 4 months ago (2015-08-18 18:28:48 UTC) #11
Miguel Garcia
https://chromiumcodereview.appspot.com/1292003004/diff/20001/ui/message_center/notification.h File ui/message_center/notification.h (right): https://chromiumcodereview.appspot.com/1292003004/diff/20001/ui/message_center/notification.h#newcode41 ui/message_center/notification.h:41: bool use_origin_as_context; Following our chat yesterday I implemented the ...
5 years, 4 months ago (2015-08-19 15:02:59 UTC) #12
Jun Mukai
lgtm You'd better get a style-check for objc files though. I'm not familiar with Chromium's ...
5 years, 4 months ago (2015-08-19 17:26:05 UTC) #13
Jun Mukai
On 2015/08/19 17:26:05, Jun Mukai wrote: > lgtm > > You'd better get a style-check ...
5 years, 4 months ago (2015-08-19 17:28:36 UTC) #14
Miguel Garcia
Thanks! I rather keep the constructor, since it's such a mechanic change on those files ...
5 years, 4 months ago (2015-08-19 17:50:23 UTC) #16
Nico
Objective-C looks fine. https://chromiumcodereview.appspot.com/1292003004/diff/40001/ui/message_center/cocoa/notification_controller.h File ui/message_center/cocoa/notification_controller.h (right): https://chromiumcodereview.appspot.com/1292003004/diff/40001/ui/message_center/cocoa/notification_controller.h#newcode74 ui/message_center/cocoa/notification_controller.h:74: - (bool)useOriginAsContextMessage: https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Conventions/Conventions.html " The exception ...
5 years, 4 months ago (2015-08-19 17:58:12 UTC) #17
Jun Mukai
https://chromiumcodereview.appspot.com/1292003004/diff/40001/ui/message_center/cocoa/notification_controller.mm File ui/message_center/cocoa/notification_controller.mm (right): https://chromiumcodereview.appspot.com/1292003004/diff/40001/ui/message_center/cocoa/notification_controller.mm#newcode665 ui/message_center/cocoa/notification_controller.mm:665: notification->origin_url().SchemeIsHTTPOrHTTPS()); On 2015/08/19 17:58:12, Nico wrote: > This kind ...
5 years, 4 months ago (2015-08-19 18:06:02 UTC) #18
Miguel Garcia
Thanks for the review! On 2015/08/19 17:58:12, Nico wrote: > Objective-C looks fine. > > ...
5 years, 4 months ago (2015-08-19 18:07:00 UTC) #19
Miguel Garcia
Just saw Jun's reply, it seems we all agree now! I will add the method ...
5 years, 4 months ago (2015-08-19 18:09:07 UTC) #20
Miguel Garcia
PTAL https://codereview.chromium.org/1292003004/diff/40001/ui/message_center/cocoa/notification_controller.h File ui/message_center/cocoa/notification_controller.h (right): https://codereview.chromium.org/1292003004/diff/40001/ui/message_center/cocoa/notification_controller.h#newcode74 ui/message_center/cocoa/notification_controller.h:74: - (bool)useOriginAsContextMessage: On 2015/08/19 17:58:11, Nico wrote: > ...
5 years, 4 months ago (2015-08-19 19:52:46 UTC) #21
Nico
lgtm with formatting nit addressed https://codereview.chromium.org/1292003004/diff/60001/ui/message_center/cocoa/notification_controller.mm File ui/message_center/cocoa/notification_controller.mm (right): https://codereview.chromium.org/1292003004/diff/60001/ui/message_center/cocoa/notification_controller.mm#newcode446 ui/message_center/cocoa/notification_controller.mm:446: forFont:[contextMessage_ font] align the ...
5 years, 4 months ago (2015-08-19 21:05:31 UTC) #22
oshima
ash, c/b/chromeos lgtm
5 years, 4 months ago (2015-08-20 00:32:35 UTC) #23
Miguel Garcia
TBR pkasting for the new DEPS.
5 years, 4 months ago (2015-08-20 07:44:54 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1292003004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1292003004/80001
5 years, 4 months ago (2015-08-20 07:45:14 UTC) #27
Miguel Garcia
https://codereview.chromium.org/1292003004/diff/60001/ui/message_center/cocoa/notification_controller.mm File ui/message_center/cocoa/notification_controller.mm (right): https://codereview.chromium.org/1292003004/diff/60001/ui/message_center/cocoa/notification_controller.mm#newcode446 ui/message_center/cocoa/notification_controller.mm:446: forFont:[contextMessage_ font] On 2015/08/19 21:05:30, Nico (on vacation Thu ...
5 years, 4 months ago (2015-08-20 07:45:26 UTC) #28
Peter Kasting
LGTM
5 years, 4 months ago (2015-08-20 08:09:14 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/42154)
5 years, 4 months ago (2015-08-20 08:17:23 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1292003004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1292003004/80001
5 years, 4 months ago (2015-08-20 08:25:04 UTC) #34
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 4 months ago (2015-08-20 09:00:38 UTC) #35
commit-bot: I haz the power
5 years, 4 months ago (2015-08-20 09:01:29 UTC) #36
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/53a6dde573f020d57b4fff5923f272f98da66e27
Cr-Commit-Position: refs/heads/master@{#344455}

Powered by Google App Engine
This is Rietveld 408576698