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

Unified Diff: ash/system/chromeos/network/network_state_notifier.h

Issue 23075012: Update NetworkStateNotifier to use message_center. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update string ids, handle empty name Created 7 years, 4 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: ash/system/chromeos/network/network_state_notifier.h
diff --git a/ash/system/chromeos/network/network_state_notifier.h b/ash/system/chromeos/network/network_state_notifier.h
index 5e944c5a191ee947bb38e5f237a516fa9bbde732..586833e4dd5afa90a7b3dd2b3c4c529ef74a1ee3 100644
--- a/ash/system/chromeos/network/network_state_notifier.h
+++ b/ash/system/chromeos/network/network_state_notifier.h
@@ -5,10 +5,9 @@
#ifndef ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_STATE_NOTIFIER_H_
#define ASH_SYSTEM_CHROMEOS_NETWORK_NETWORK_STATE_NOTIFIER_H_
-#include <map>
+#include <set>
#include "ash/ash_export.h"
-#include "ash/system/chromeos/network/network_tray_delegate.h"
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
@@ -34,8 +33,7 @@ namespace ash {
// 2. It observes NetworkState changes to generate notifications when a
// Cellular network is out of credits.
class ASH_EXPORT NetworkStateNotifier :
- public chromeos::NetworkStateHandlerObserver,
- public NetworkTrayDelegate {
+ public chromeos::NetworkStateHandlerObserver {
public:
NetworkStateNotifier();
virtual ~NetworkStateNotifier();
@@ -46,11 +44,6 @@ class ASH_EXPORT NetworkStateNotifier :
virtual void NetworkPropertiesUpdated(
const chromeos::NetworkState* network) OVERRIDE;
- // NetworkTrayDelegate
- virtual void NotificationLinkClicked(
- NetworkObserver::MessageType message_type,
- size_t link_index) OVERRIDE;
-
// Show a connection error notification. If |error_name| matches an error
// defined in NetworkConnectionHandler for connect, configure, or activation
// failed, then the associated message is shown, otherwise the Shill
@@ -74,10 +67,12 @@ class ASH_EXPORT NetworkStateNotifier :
const std::string& service_path,
const base::DictionaryValue& shill_properties);
- std::string last_active_network_;
- std::string cellular_network_;
- bool cellular_out_of_credits_;
+ void UpdateCellularOutOfCredits(const chromeos::NetworkState* cellular);
+ void UpdateCellularActivating(const chromeos::NetworkState* cellular);
+
+ bool did_show_out_of_credits_;
base::Time out_of_credits_notify_time_;
+ std::set<std::string> cellular_activating_;
base::WeakPtrFactory<NetworkStateNotifier> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(NetworkStateNotifier);

Powered by Google App Engine
This is Rietveld 408576698