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

Unified Diff: chrome/browser/chromeos/network_message_observer.cc

Issue 10907224: Data promo notification should follow the normal ash notifications theme. This (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 8 years, 3 months 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
Index: chrome/browser/chromeos/network_message_observer.cc
diff --git a/chrome/browser/chromeos/network_message_observer.cc b/chrome/browser/chromeos/network_message_observer.cc
index b84a5d64349c4d5951e8cddf0537e96a4b98f27d..c854fd8c920289c2c86667a696f2be36329feed2 100644
--- a/chrome/browser/chromeos/network_message_observer.cc
+++ b/chrome/browser/chromeos/network_message_observer.cc
@@ -48,7 +48,7 @@ namespace chromeos {
class NetworkMessageNotification : public ash::NetworkTrayDelegate {
public:
NetworkMessageNotification(Profile* profile,
- ash::NetworkObserver::ErrorType error_type)
+ ash::NetworkObserver::MessageType error_type)
: error_type_(error_type) {
std::string id;
int icon_id = 0;
@@ -68,6 +68,9 @@ class NetworkMessageNotification : public ash::NetworkTrayDelegate {
icon_id = IDR_NOTIFICATION_BARS_EMPTY;
title_ = l10n_util::GetStringUTF16(IDS_NETWORK_OUT_OF_DATA_TITLE);
break;
+ default:
+ NOTREACHED();
+ break;
}
DCHECK(!id.empty());
if (CommandLine::ForCurrentProcess()->HasSwitch(
@@ -78,7 +81,7 @@ class NetworkMessageNotification : public ash::NetworkTrayDelegate {
}
// Overridden from ash::NetworkTrayDelegate:
- virtual void NotificationLinkClicked() {
+ virtual void NotificationLinkClicked(size_t index) OVERRIDE {
base::ListValue empty_value;
if (!callback_.is_null())
callback_.Run(&empty_value);
@@ -89,7 +92,7 @@ class NetworkMessageNotification : public ash::NetworkTrayDelegate {
system_notification_->Hide();
} else {
ash::Shell::GetInstance()->system_tray()->network_observer()->
- ClearNetworkError(error_type_);
+ ClearNetworkMessage(error_type_);
}
}
@@ -108,8 +111,10 @@ class NetworkMessageNotification : public ash::NetworkTrayDelegate {
system_notification_->Show(message, link_text, callback, urgent, sticky);
} else {
callback_ = callback;
+ std::vector<string16> links;
+ links.push_back(link_text);
ash::Shell::GetInstance()->system_tray()->network_observer()->
- SetNetworkError(this, error_type_, title_, message, link_text);
+ SetNetworkMessage(this, error_type_, title_, message, links);
}
}
@@ -128,7 +133,7 @@ class NetworkMessageNotification : public ash::NetworkTrayDelegate {
private:
string16 title_;
scoped_ptr<SystemNotification> system_notification_;
- ash::NetworkObserver::ErrorType error_type_;
+ ash::NetworkObserver::MessageType error_type_;
BalloonViewHost::MessageCallback callback_;
};

Powered by Google App Engine
This is Rietveld 408576698