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

Side by Side Diff: chrome/browser/chromeos/network_message_observer.h

Issue 6347044: Only show notification for low 3g data for the last data-based plan.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_NETWORK_MESSAGE_OBSERVER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_NETWORK_MESSAGE_OBSERVER_H_
6 #define CHROME_BROWSER_CHROMEOS_NETWORK_MESSAGE_OBSERVER_H_ 6 #define CHROME_BROWSER_CHROMEOS_NETWORK_MESSAGE_OBSERVER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 10 matching lines...) Expand all
21 // messages. 21 // messages.
22 22
23 class NetworkMessageObserver : public NetworkLibrary::NetworkManagerObserver, 23 class NetworkMessageObserver : public NetworkLibrary::NetworkManagerObserver,
24 public NetworkLibrary::CellularDataPlanObserver { 24 public NetworkLibrary::CellularDataPlanObserver {
25 public: 25 public:
26 explicit NetworkMessageObserver(Profile* profile); 26 explicit NetworkMessageObserver(Profile* profile);
27 virtual ~NetworkMessageObserver(); 27 virtual ~NetworkMessageObserver();
28 28
29 typedef std::map<std::string, WifiNetwork*> ServicePathWifiMap; 29 typedef std::map<std::string, WifiNetwork*> ServicePathWifiMap;
30 typedef std::map<std::string, CellularNetwork*> ServicePathCellularMap; 30 typedef std::map<std::string, CellularNetwork*> ServicePathCellularMap;
31 static bool IsApplicableBackupPlan(const CellularDataPlan* plan,
32 const CellularDataPlan* other_plan);
31 private: 33 private:
32 virtual void OpenMobileSetupPage(const ListValue* args); 34 virtual void OpenMobileSetupPage(const ListValue* args);
33 virtual void OpenMoreInfoPage(const ListValue* args); 35 virtual void OpenMoreInfoPage(const ListValue* args);
36 virtual void HideDataNotifications();
37 virtual void InitNewPlan(const CellularDataPlan* plan);
38 virtual void ShowNoDataNotification(const CellularDataPlan* plan);
39 virtual void ShowLowDataNotification(const CellularDataPlan* plan);
34 40
35 // NetworkLibrary::NetworkManagerObserver implementation. 41 // NetworkLibrary::NetworkManagerObserver implementation.
36 virtual void OnNetworkManagerChanged(NetworkLibrary* obj); 42 virtual void OnNetworkManagerChanged(NetworkLibrary* obj);
37 // NetworkLibrary::CellularDataPlanObserver implementation. 43 // NetworkLibrary::CellularDataPlanObserver implementation.
38 virtual void OnCellularDataPlanChanged(NetworkLibrary* obj); 44 virtual void OnCellularDataPlanChanged(NetworkLibrary* obj);
39 45
40 // Wifi networks by service path. 46 // Wifi networks by service path.
41 ServicePathWifiMap wifi_networks_; 47 ServicePathWifiMap wifi_networks_;
42 // Cellular networks by service path. 48 // Cellular networks by service path.
43 ServicePathCellularMap cellular_networks_; 49 ServicePathCellularMap cellular_networks_;
44 50
45 // Current connect celluar service path. 51 // Current connect celluar service path.
46 std::string cellular_service_path_; 52 std::string cellular_service_path_;
47 // Last cellular data plan name and type. 53 // Last cellular data plan unique id.
48 std::string cellular_data_plan_name_; 54 std::string cellular_data_plan_unique_id_;
49 CellularDataPlanType cellular_data_plan_type_;
50 55
51 // Notification for connection errors 56 // Notification for connection errors
52 SystemNotification notification_connection_error_; 57 SystemNotification notification_connection_error_;
53 // Notification for showing low data warning 58 // Notification for showing low data warning
54 SystemNotification notification_low_data_; 59 SystemNotification notification_low_data_;
55 // Notification for showing no data warning 60 // Notification for showing no data warning
56 SystemNotification notification_no_data_; 61 SystemNotification notification_no_data_;
57 62
58 DISALLOW_COPY_AND_ASSIGN(NetworkMessageObserver); 63 DISALLOW_COPY_AND_ASSIGN(NetworkMessageObserver);
59 }; 64 };
60 65
61 } // namespace chromeos 66 } // namespace chromeos
62 67
63 #endif // CHROME_BROWSER_CHROMEOS_NETWORK_MESSAGE_OBSERVER_H_ 68 #endif // CHROME_BROWSER_CHROMEOS_NETWORK_MESSAGE_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/network_library.cc ('k') | chrome/browser/chromeos/network_message_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698