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

Unified Diff: chrome/browser/chromeos/status/data_promo_notification.cc

Issue 11312139: Add SystemTrayObservers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comment. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/sms_observer.cc ('k') | chrome/browser/chromeos/system/ash_system_tray_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/status/data_promo_notification.cc
diff --git a/chrome/browser/chromeos/status/data_promo_notification.cc b/chrome/browser/chromeos/status/data_promo_notification.cc
index 6d1cfcf43c996549729ce4b4a73e4f3f1afdbdd0..2acb823a219e5166da706c99157959a11993eb77 100644
--- a/chrome/browser/chromeos/status/data_promo_notification.cc
+++ b/chrome/browser/chromeos/status/data_promo_notification.cc
@@ -8,6 +8,7 @@
#include "ash/shell_window_ids.h"
#include "ash/system/chromeos/network/network_observer.h"
#include "ash/system/tray/system_tray.h"
+#include "ash/system/tray/system_tray_notifier.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/cros/cros_library.h"
@@ -202,12 +203,9 @@ void DataPromoNotification::ShowOptionalMobileDataPromoNotification(
links.push_back(l10n_util::GetStringUTF16(link_message_id));
if (!deal_info_url_.empty())
links.push_back(l10n_util::GetStringUTF16(IDS_LEARN_MORE));
- if (ash::Shell::GetInstance()->system_tray()->network_observer()) {
- ash::Shell::GetInstance()->system_tray()->network_observer()->
- SetNetworkMessage(listener, ash::NetworkObserver::MESSAGE_DATA_PROMO,
- string16(), message, links);
- }
-
+ ash::Shell::GetInstance()->system_tray_notifier()->NotifySetNetworkMessage(
+ listener, ash::NetworkObserver::MESSAGE_DATA_PROMO,
+ string16(), message, links);
check_for_promo_ = false;
SetShow3gPromoNotification(false);
if (carrier_deal_promo_pref != kNotificationCountPrefDefault)
@@ -216,11 +214,8 @@ void DataPromoNotification::ShowOptionalMobileDataPromoNotification(
}
void DataPromoNotification::CloseNotification() {
- if (ash::Shell::GetInstance()->status_area_widget() &&
- ash::Shell::GetInstance()->system_tray()->network_observer()) {
- ash::Shell::GetInstance()->system_tray()->network_observer()->
- ClearNetworkMessage(ash::NetworkObserver::MESSAGE_DATA_PROMO);
- }
+ ash::Shell::GetInstance()->system_tray_notifier()->NotifyClearNetworkMessage(
+ ash::NetworkObserver::MESSAGE_DATA_PROMO);
}
} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/sms_observer.cc ('k') | chrome/browser/chromeos/system/ash_system_tray_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698