summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/generated_resources.grd8
-rw-r--r--chrome/browser/about_flags.cc8
-rw-r--r--chrome/browser/chromeos/extensions/file_browser_notifications.cc4
-rw-r--r--chrome/browser/chromeos/locale_change_guard.cc3
-rw-r--r--chrome/browser/chromeos/network_message_observer.cc6
-rw-r--r--chrome/browser/chromeos/profile_startup.cc8
-rw-r--r--chrome/browser/notifications/desktop_notification_service.cc3
-rw-r--r--chrome/browser/task_manager/task_manager_notification_browsertest.cc6
-rw-r--r--chrome/browser/ui/views/ash/balloon_collection_impl_ash.cc3
9 files changed, 29 insertions, 20 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 38b94cf..86cfb6c 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -5777,11 +5777,11 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_FLAGS_ENABLE_ASH_EXTENDED_DESKTOP_DESCRIPTION" desc="Description of the flag to enable extended desktop in ash.">
Enables extended desktop, which allows you to open a browser in secondary displays.
</message>
- <message name="IDS_FLAGS_ENABLE_ASH_NOTIFY_NAME" desc="Name of the flag to enable applist v2 in ash.">
- Enable Ash notifications.
+ <message name="IDS_FLAGS_DISABLE_ASH_NOTIFY_NAME" desc="Name of the flag to enable applist v2 in ash.">
+ Disable Ash notifications.
</message>
- <message name="IDS_FLAGS_ENABLE_ASH_NOTIFY_DESCRIPTION" desc="Description of the flag to enable ash notifications.">
- Enables ash status tray notifications instead of desktop system notifications.
+ <message name="IDS_FLAGS_DISABLE_ASH_NOTIFY_DESCRIPTION" desc="Description of the flag to disable ash notifications.">
+ Disables ash status tray notifications and enables desktop system notifications.
</message>
<message name="IDS_FLAGS_ENABLE_PINCH_SCALE_NAME" desc="Name of the flag to turn on experiental pinch to scale.">
Enable pinch scale.
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 233f487..3aeaff4 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -744,11 +744,11 @@ const Experiment kExperiments[] = {
SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)
},
{
- "ash-notify",
- IDS_FLAGS_ENABLE_ASH_NOTIFY_NAME,
- IDS_FLAGS_ENABLE_ASH_NOTIFY_DESCRIPTION,
+ "ash-notify-disabled",
+ IDS_FLAGS_DISABLE_ASH_NOTIFY_NAME,
+ IDS_FLAGS_DISABLE_ASH_NOTIFY_DESCRIPTION,
kOsAll,
- SINGLE_VALUE_TYPE(ash::switches::kAshNotify),
+ SINGLE_VALUE_TYPE(ash::switches::kAshNotifyDisabled),
},
{
"enable-pinch",
diff --git a/chrome/browser/chromeos/extensions/file_browser_notifications.cc b/chrome/browser/chromeos/extensions/file_browser_notifications.cc
index c0ac6ea..1674c3e 100644
--- a/chrome/browser/chromeos/extensions/file_browser_notifications.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_notifications.cc
@@ -134,8 +134,8 @@ class FileBrowserNotifications::NotificationMessage {
type_(type),
notification_id_(notification_id),
message_(message) {
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- ash::switches::kAshNotify)) {
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ ash::switches::kAshNotifyDisabled)) {
const gfx::ImageSkia& icon =
*ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
GetIconId(type_));
diff --git a/chrome/browser/chromeos/locale_change_guard.cc b/chrome/browser/chromeos/locale_change_guard.cc
index 4ceb92b..aa861e2 100644
--- a/chrome/browser/chromeos/locale_change_guard.cc
+++ b/chrome/browser/chromeos/locale_change_guard.cc
@@ -173,7 +173,8 @@ void LocaleChangeGuard::Check() {
PrepareChangingLocale(from_locale, to_locale);
}
- if (CommandLine::ForCurrentProcess()->HasSwitch(ash::switches::kAshNotify)) {
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ ash::switches::kAshNotifyDisabled)) {
ash::Shell::GetInstance()->system_tray()->locale_observer()->
OnLocaleChanged(this, cur_locale, from_locale_, to_locale_);
return;
diff --git a/chrome/browser/chromeos/network_message_observer.cc b/chrome/browser/chromeos/network_message_observer.cc
index e659b77..317f019 100644
--- a/chrome/browser/chromeos/network_message_observer.cc
+++ b/chrome/browser/chromeos/network_message_observer.cc
@@ -68,9 +68,9 @@ class NetworkMessageNotification : public ash::NetworkTrayDelegate {
title_ = l10n_util::GetStringUTF16(IDS_NETWORK_OUT_OF_DATA_TITLE);
break;
}
- LOG_IF(ERROR, id.empty()) << "Unexpected error type: " << error_type;
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- ash::switches::kAshNotify) && !id.empty()) {
+ DCHECK(!id.empty());
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ ash::switches::kAshNotifyDisabled)) {
system_notification_.reset(
new SystemNotification(profile, id, icon_id, title_));
}
diff --git a/chrome/browser/chromeos/profile_startup.cc b/chrome/browser/chromeos/profile_startup.cc
index 7081e16..5412f63 100644
--- a/chrome/browser/chromeos/profile_startup.cc
+++ b/chrome/browser/chromeos/profile_startup.cc
@@ -33,8 +33,8 @@ void ProfileStartup(Profile* profile, bool process_startup) {
if (process_startup) {
// These observers are singletons. They are never deleted but the pointers
// are kept in a statics so that they are not reported as leaks.
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- ash::switches::kAshNotify)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ ash::switches::kAshNotifyDisabled)) {
static chromeos::LowBatteryObserver* low_battery_observer =
new chromeos::LowBatteryObserver(profile);
chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver(
@@ -50,8 +50,8 @@ void ProfileStartup(Profile* profile, bool process_startup) {
chromeos::CrosLibrary::Get()->GetNetworkLibrary()->
AddUserActionObserver(network_message_observer);
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- ash::switches::kAshNotify)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ ash::switches::kAshNotifyDisabled)) {
static chromeos::SmsObserver* sms_observer =
new chromeos::SmsObserver(profile);
chromeos::CrosLibrary::Get()->GetNetworkLibrary()->
diff --git a/chrome/browser/notifications/desktop_notification_service.cc b/chrome/browser/notifications/desktop_notification_service.cc
index c7014a7..0a89807 100644
--- a/chrome/browser/notifications/desktop_notification_service.cc
+++ b/chrome/browser/notifications/desktop_notification_service.cc
@@ -52,7 +52,8 @@
namespace {
bool IsAshNotifyEnabled() {
- return CommandLine::ForCurrentProcess()->HasSwitch(ash::switches::kAshNotify);
+ return !CommandLine::ForCurrentProcess()->HasSwitch(
+ ash::switches::kAshNotifyDisabled);
}
} // namespace
diff --git a/chrome/browser/task_manager/task_manager_notification_browsertest.cc b/chrome/browser/task_manager/task_manager_notification_browsertest.cc
index f428ed3..233335f 100644
--- a/chrome/browser/task_manager/task_manager_notification_browsertest.cc
+++ b/chrome/browser/task_manager/task_manager_notification_browsertest.cc
@@ -19,6 +19,10 @@
#include "content/public/common/content_switches.h"
#include "testing/gtest/include/gtest/gtest.h"
+#if !defined(USE_ASH)
+// These tests do not apply on Ash where notifications do not instantiate
+// a new renderer.
+
class TaskManagerNotificationBrowserTest : public ExtensionBrowserTest {
public:
TaskManagerModel* model() const {
@@ -68,3 +72,5 @@ IN_PROC_BROWSER_TEST_F(TaskManagerNotificationBrowserTest,
notifications->CancelById(n2.notification_id());
TaskManagerBrowserTestUtil::WaitForResourceChange(2);
}
+
+#endif // !USE_ASH
diff --git a/chrome/browser/ui/views/ash/balloon_collection_impl_ash.cc b/chrome/browser/ui/views/ash/balloon_collection_impl_ash.cc
index bc9de45..85868aa 100644
--- a/chrome/browser/ui/views/ash/balloon_collection_impl_ash.cc
+++ b/chrome/browser/ui/views/ash/balloon_collection_impl_ash.cc
@@ -22,7 +22,8 @@
namespace {
bool IsAshNotifyEnabled() {
- return CommandLine::ForCurrentProcess()->HasSwitch(ash::switches::kAshNotify);
+ return !CommandLine::ForCurrentProcess()->HasSwitch(
+ ash::switches::kAshNotifyDisabled);
}
} // namespace