OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_NET_NETWORK_CHANGE_NOTIFIER_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_NET_NETWORK_CHANGE_NOTIFIER_CHROMEOS_H_ |
6 #define CHROME_BROWSER_CHROMEOS_NET_NETWORK_CHANGE_NOTIFIER_CHROMEOS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_NET_NETWORK_CHANGE_NOTIFIER_CHROMEOS_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 74 |
75 // Updates the initial state. Lets us trigger initial eval of the | 75 // Updates the initial state. Lets us trigger initial eval of the |
76 // connectivity status without waiting for an event from the connection | 76 // connectivity status without waiting for an event from the connection |
77 // manager. | 77 // manager. |
78 static void UpdateInitialState(NetworkChangeNotifierChromeos* self); | 78 static void UpdateInitialState(NetworkChangeNotifierChromeos* self); |
79 | 79 |
80 // Gets connection type for given |network|. | 80 // Gets connection type for given |network|. |
81 static net::NetworkChangeNotifier::ConnectionType GetNetworkConnectionType( | 81 static net::NetworkChangeNotifier::ConnectionType GetNetworkConnectionType( |
82 const chromeos::Network* network); | 82 const chromeos::Network* network); |
83 | 83 |
| 84 // Get parameters for calculating new combined signal. |
| 85 static NetworkChangeCalculatorParams NetworkChangeCalculatorParamsChromeos(); |
| 86 |
84 // True if we previously had an active network around. | 87 // True if we previously had an active network around. |
85 bool has_active_network_; | 88 bool has_active_network_; |
86 // Current active network's connection state. | 89 // Current active network's connection state. |
87 chromeos::ConnectionState connection_state_; | 90 chromeos::ConnectionState connection_state_; |
88 // Current active network's connection type. | 91 // Current active network's connection type. |
89 net::NetworkChangeNotifier::ConnectionType connection_type_; | 92 net::NetworkChangeNotifier::ConnectionType connection_type_; |
90 // Current active network's service path. | 93 // Current active network's service path. |
91 std::string service_path_; | 94 std::string service_path_; |
92 // Current active network's IP address. | 95 // Current active network's IP address. |
93 std::string ip_address_; | 96 std::string ip_address_; |
94 // Current active network's name servers. | 97 // Current active network's name servers. |
95 std::vector<std::string> name_servers_; | 98 std::vector<std::string> name_servers_; |
96 | 99 |
97 scoped_ptr<DnsConfigServiceChromeos> dns_config_service_; | 100 scoped_ptr<DnsConfigServiceChromeos> dns_config_service_; |
98 | 101 |
99 base::WeakPtrFactory<NetworkChangeNotifierChromeos> weak_factory_; | 102 base::WeakPtrFactory<NetworkChangeNotifierChromeos> weak_factory_; |
100 | 103 |
101 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierChromeos); | 104 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierChromeos); |
102 }; | 105 }; |
103 | 106 |
104 } // namespace chromeos | 107 } // namespace chromeos |
105 | 108 |
106 #endif // CHROME_BROWSER_CHROMEOS_NET_NETWORK_CHANGE_NOTIFIER_CHROMEOS_H_ | 109 #endif // CHROME_BROWSER_CHROMEOS_NET_NETWORK_CHANGE_NOTIFIER_CHROMEOS_H_ |
OLD | NEW |