Skip to content

Commit

Permalink
Add new flag for Notification Center features that are not ready yet.
Browse files Browse the repository at this point in the history
We are planning to use it during the next month while polishing UI for notifications and trying various experiments.

BUG=none

Review URL: https://codereview.chromium.org/69623002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234694 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
dimich@chromium.org committed Nov 13, 2013
1 parent 7936898 commit 74dae79
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 0 deletions.
6 changes: 6 additions & 0 deletions chrome/app/generated_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -6690,6 +6690,12 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION" desc="Description for the flag to enable rich notifications.">
Enable rich templated notifications. Both HTML5 notifications and app notifications will be shown through new Notification Center.
</message>
<message name="IDS_FLAGS_ENABLE_EXPERIMENTAL_NOTIFICATION_UI_NAME" desc="Name of the flag to enable experimental UI for notifications.">
Enable experimental UI for Notifications
</message>
<message name="IDS_FLAGS_ENABLE_EXPERIMENTAL_NOTIFICATION_UI_DESCRIPTION" desc="Description for the flag to enable experimental UI for notifications.">
Used for various Notification Center features under construction/polish that are not yet ready to be shipped.
</message>
<message name="IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME" desc="Name of the flag to enable synced notifications.">
Enable Synced Notifications
</message>
Expand Down
8 changes: 8 additions & 0 deletions chrome/browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1358,6 +1358,14 @@ const Experiment kExperiments[] = {
message_center::switches::kEnableRichNotifications,
message_center::switches::kDisableRichNotifications)
},
{
"enable-experimental-notification-ui",
IDS_FLAGS_ENABLE_EXPERIMENTAL_NOTIFICATION_UI_NAME,
IDS_FLAGS_ENABLE_EXPERIMENTAL_NOTIFICATION_UI_DESCRIPTION,
kOsDesktop,
SINGLE_VALUE_TYPE(
message_center::switches::kEnableExperimentalNotificationUI)
},
{
"enable-sync-synced-notifications",
IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME,
Expand Down
3 changes: 3 additions & 0 deletions ui/message_center/message_center_switches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@ namespace switches {
const char kDisableRichNotifications[] = "disable-rich-notifications";
const char kEnableRichNotifications[] = "enable-rich-notifications";

const char kEnableExperimentalNotificationUI[] =
"enable-experimental-notification-ui";

} // namespace switches
} // namespace message_center
3 changes: 3 additions & 0 deletions ui/message_center/message_center_switches.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ namespace switches {
MESSAGE_CENTER_EXPORT extern const char kEnableRichNotifications[];
MESSAGE_CENTER_EXPORT extern const char kDisableRichNotifications[];

// Enables experimental features that we don't want to ship yet.
MESSAGE_CENTER_EXPORT extern const char kEnableExperimentalNotificationUI[];

} // namespace switches
} // namespace message_center

Expand Down
5 changes: 5 additions & 0 deletions ui/message_center/message_center_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,9 @@ bool IsRichNotificationEnabled() {
return true;
}

bool IsExperimentalNotificationUIEnabled() {
return CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableExperimentalNotificationUI);
}

} // namespace message_center
2 changes: 2 additions & 0 deletions ui/message_center/message_center_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ MESSAGE_CENTER_EXPORT bool IsRichNotificationEnabled();
#define RUN_MESSAGE_CENTER_TESTS 1
#endif

MESSAGE_CENTER_EXPORT bool IsExperimentalNotificationUIEnabled();

} // namespace message_center

#endif // UI_MESSAGE_CENTER_MESSAGE_CENTER_UTIL_H_

0 comments on commit 74dae79

Please sign in to comment.