Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Issue 23534048: Turn on Synced Notification Sending services by default for all users, and save preferences. (Closed)

Created:
7 years, 3 months ago by Pete Williamson
Modified:
7 years, 3 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Turn on Synced Notification Sending services by default for all users, and save preferences. This is for the new Synced Notification feature, which allows servers to send notification toasts to the chrome message center (also called the notification center). As things stand today (before this checkin), Synced Notifications is enabled, but each data type from an individual server needs to be intentionally enabled by the user finding the notification center settings panel and clicking a check box for that service to the "enabled" state. After lots of rounds of UI discussion we decided the best experience for the user is to default the sending services to enabled instead of the way it defaults to disabled today. So, the goal of this checkin is just to change the state of the existing synced notification type from disabled to enabled by default. As it turns out, it wasn't as easy as just changing false to true somewhere. We opted (after the first round of code review) for a scheme that maintains two preference lists, a list of enabled synced notification services (which we will now add our first sending service to, and in the future we plan to add other services), and a list of preferences that we have "initialized" (or basically turned them on by default once). We need the second list because we are turning the service on at runtime, and if the user later wants to turn the service off, we need to remember and not just turn it on again. I intended to describe this part adequately in my changelist, but apparently I didn't describe it well enough, and I'll try to amend the description. BUG=280250 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=224080

Patch Set 1 #

Total comments: 10

Patch Set 2 : Enable G+ by default - CR fixes per DewittJ #

Patch Set 3 : Enable G+ by default - Use a pref list for enabled services #

Patch Set 4 : Enable G+ by default - Use a pref list for enabled services #

Patch Set 5 : Enable G+ by default - Use a pref list for enabled services #

Patch Set 6 : Enable G+ by default - Use a pref list for enabled services #

Total comments: 7

Patch Set 7 : Enable G+ by default - More CR fixes per DewittJ #

Total comments: 8

Patch Set 8 : Enable G+ by default - Use my pref variable in more places #

Patch Set 9 : Enable G+ by default - fix windows compile #

Patch Set 10 : Enable G+ by default - fix android compile #

Patch Set 11 : Enable G+ by default - remove unneeded header on android #

Unified diffs Side-by-side diffs Delta from patch set Stats (+333 lines, -57 lines) Patch
M chrome/browser/notifications/desktop_notification_service.cc View 1 2 3 4 1 chunk +0 lines, -18 lines 0 comments Download
M chrome/browser/notifications/sync_notifier/chrome_notifier_service.h View 1 2 3 4 5 6 7 6 chunks +42 lines, -3 lines 0 comments Download
M chrome/browser/notifications/sync_notifier/chrome_notifier_service.cc View 1 2 3 4 5 6 7 7 chunks +149 lines, -12 lines 0 comments Download
M chrome/browser/notifications/sync_notifier/chrome_notifier_service_unittest.cc View 1 2 3 4 5 6 7 8 15 chunks +74 lines, -17 lines 0 comments Download
chrome/browser/notifications/sync_notifier/synced_notification.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/notifications/sync_notifier/synced_notification.cc View 1 2 3 4 4 chunks +24 lines, -2 lines 0 comments Download
M chrome/browser/notifications/sync_notifier/synced_notification_unittest.cc View 1 2 3 4 3 chunks +24 lines, -5 lines 0 comments Download
M chrome/browser/prefs/browser_prefs.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
Pete Williamson
BauerB@ Please review browser_prefs.cc DewittJ@ Please review everything else There is a Synced Notifications feature ...
7 years, 3 months ago (2013-09-04 22:10:32 UTC) #1
Bernhard Bauer
c/b/p LGTM.
7 years, 3 months ago (2013-09-04 22:18:40 UTC) #2
dewittj
https://codereview.chromium.org/23534048/diff/1/chrome/browser/notifications/message_center_settings_controller.cc File chrome/browser/notifications/message_center_settings_controller.cc (left): https://codereview.chromium.org/23534048/diff/1/chrome/browser/notifications/message_center_settings_controller.cc#oldcode324 chrome/browser/notifications/message_center_settings_controller.cc:324: notification_service->SetNotifierEnabled(notifier.notifier_id, enabled); This affects all types besides webpage, you ...
7 years, 3 months ago (2013-09-05 15:38:44 UTC) #3
Pete Williamson
CR fixes per dewittJ https://codereview.chromium.org/23534048/diff/1/chrome/browser/notifications/message_center_settings_controller.cc File chrome/browser/notifications/message_center_settings_controller.cc (left): https://codereview.chromium.org/23534048/diff/1/chrome/browser/notifications/message_center_settings_controller.cc#oldcode324 chrome/browser/notifications/message_center_settings_controller.cc:324: notification_service->SetNotifierEnabled(notifier.notifier_id, enabled); On 2013/09/05 15:38:44, ...
7 years, 3 months ago (2013-09-09 17:59:06 UTC) #4
dewittj
> On 2013/09/05 15:38:44, dewittj wrote: > > I prefer a StringListPrefMember like you have ...
7 years, 3 months ago (2013-09-09 18:13:16 UTC) #5
Pete Williamson
thakis@ - Please look at prefs.cc and prefs.h (Feel free to look at more if ...
7 years, 3 months ago (2013-09-13 00:54:16 UTC) #6
Nico
I don't understand what this CL does after reading CL description and bug.
7 years, 3 months ago (2013-09-13 04:29:03 UTC) #7
Pete Williamson
On 2013/09/13 04:29:03, Nico wrote: > I don't understand what this CL does after reading ...
7 years, 3 months ago (2013-09-14 00:08:43 UTC) #8
Nico
lgtm https://codereview.chromium.org/23534048/diff/21001/chrome/browser/notifications/sync_notifier/synced_notification.cc File chrome/browser/notifications/sync_notifier/synced_notification.cc (right): https://codereview.chromium.org/23534048/diff/21001/chrome/browser/notifications/sync_notifier/synced_notification.cc#newcode92 chrome/browser/notifications/sync_notifier/synced_notification.cc:92: // dpi bitmap when appropriate. (the way images ...
7 years, 3 months ago (2013-09-14 00:22:36 UTC) #9
dewittj
https://codereview.chromium.org/23534048/diff/21001/chrome/browser/notifications/sync_notifier/chrome_notifier_service.cc File chrome/browser/notifications/sync_notifier/chrome_notifier_service.cc (right): https://codereview.chromium.org/23534048/diff/21001/chrome/browser/notifications/sync_notifier/chrome_notifier_service.cc#newcode42 chrome/browser/notifications/sync_notifier/chrome_notifier_service.cc:42: const char kServiceEnabledOnce[] = "NotificationServiceInitialized-"; This is unused now. ...
7 years, 3 months ago (2013-09-16 18:08:24 UTC) #10
Pete Williamson
Changed to use the pref directly instead of iterating it, several other small fixes. https://codereview.chromium.org/23534048/diff/21001/chrome/browser/notifications/sync_notifier/chrome_notifier_service.cc ...
7 years, 3 months ago (2013-09-16 21:01:08 UTC) #11
dewittj
lgtm with nits https://codereview.chromium.org/23534048/diff/23001/chrome/browser/notifications/sync_notifier/chrome_notifier_service.cc File chrome/browser/notifications/sync_notifier/chrome_notifier_service.cc (right): https://codereview.chromium.org/23534048/diff/23001/chrome/browser/notifications/sync_notifier/chrome_notifier_service.cc#newcode467 chrome/browser/notifications/sync_notifier/chrome_notifier_service.cc:467: profile_->GetPrefs()->Set(prefs::kEnabledSyncedNotificationSendingServices, Can we just use the ...
7 years, 3 months ago (2013-09-17 01:05:21 UTC) #12
Pete Williamson
Uses my pref variable in more places to address DewittJ's nits. https://codereview.chromium.org/23534048/diff/23001/chrome/browser/notifications/sync_notifier/chrome_notifier_service.cc File chrome/browser/notifications/sync_notifier/chrome_notifier_service.cc (right): ...
7 years, 3 months ago (2013-09-17 18:40:30 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/23534048/39001
7 years, 3 months ago (2013-09-17 18:43:30 UTC) #14
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 3 months ago (2013-09-17 18:55:17 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/23534048/55001
7 years, 3 months ago (2013-09-17 23:52:46 UTC) #16
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 3 months ago (2013-09-18 00:46:02 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/23534048/55001
7 years, 3 months ago (2013-09-18 16:33:14 UTC) #18
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 3 months ago (2013-09-18 19:09:16 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/23534048/75001
7 years, 3 months ago (2013-09-18 20:24:52 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/23534048/89001
7 years, 3 months ago (2013-09-18 20:53:08 UTC) #21
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 3 months ago (2013-09-18 22:39:29 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/23534048/89001
7 years, 3 months ago (2013-09-19 00:51:53 UTC) #23
commit-bot: I haz the power
7 years, 3 months ago (2013-09-19 07:41:02 UTC) #24
Message was sent while issue was closed.
Change committed as 224080

Powered by Google App Engine
This is Rietveld 408576698