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

Side by Side Diff: chromeos/network/network_state.h

Issue 12634019: NetworkChangeNotifierChromeos: Handle IPConfig property changes on the default network (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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) 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 CHROMEOS_NETWORK_NETWORK_STATE_H_ 5 #ifndef CHROMEOS_NETWORK_NETWORK_STATE_H_
6 #define CHROMEOS_NETWORK_NETWORK_STATE_H_ 6 #define CHROMEOS_NETWORK_NETWORK_STATE_H_
7 7
8 #include "chromeos/network/managed_state.h" 8 #include "chromeos/network/managed_state.h"
9 9
10 namespace base { 10 namespace base {
(...skipping 18 matching lines...) Expand all
29 const base::Value& value) OVERRIDE; 29 const base::Value& value) OVERRIDE;
30 30
31 // Fills |dictionary| with the state properties. All the properties that are 31 // Fills |dictionary| with the state properties. All the properties that are
32 // accepted by PropertyChanged are stored in |dictionary|, no other values are 32 // accepted by PropertyChanged are stored in |dictionary|, no other values are
33 // stored. 33 // stored.
34 void GetProperties(base::DictionaryValue* dictionary) const; 34 void GetProperties(base::DictionaryValue* dictionary) const;
35 35
36 // Accessors 36 // Accessors
37 const std::string& security() const { return security_; } 37 const std::string& security() const { return security_; }
38 const std::string& ip_address() const { return ip_address_; } 38 const std::string& ip_address() const { return ip_address_; }
39 const std::string& dns_servers() const { return dns_servers_; }
39 const std::string& device_path() const { return device_path_; } 40 const std::string& device_path() const { return device_path_; }
40 const std::string& guid() const { return guid_; } 41 const std::string& guid() const { return guid_; }
41 const std::string& connection_state() const { return connection_state_; } 42 const std::string& connection_state() const { return connection_state_; }
42 const std::string& error() const { return error_; } 43 const std::string& error() const { return error_; }
43 // Wireless property accessors 44 // Wireless property accessors
44 int signal_strength() const { return signal_strength_; } 45 int signal_strength() const { return signal_strength_; }
45 // Cellular property accessors 46 // Cellular property accessors
46 const std::string& technology() const { return technology_; } 47 const std::string& technology() const { return technology_; }
47 const std::string& activation_state() const { return activation_state_; } 48 const std::string& activation_state() const { return activation_state_; }
48 const std::string& roaming() const { return roaming_; } 49 const std::string& roaming() const { return roaming_; }
(...skipping 10 matching lines...) Expand all
59 static bool StateIsConnecting(const std::string& connection_state); 60 static bool StateIsConnecting(const std::string& connection_state);
60 61
61 private: 62 private:
62 friend class NetworkStateHandler; 63 friend class NetworkStateHandler;
63 friend class NetworkChangeNotifierChromeosUpdateTest; 64 friend class NetworkChangeNotifierChromeosUpdateTest;
64 65
65 // Called by NetworkStateHandler when the ip config changes. 66 // Called by NetworkStateHandler when the ip config changes.
66 void set_ip_address(const std::string& ip_address) { 67 void set_ip_address(const std::string& ip_address) {
67 ip_address_ = ip_address; 68 ip_address_ = ip_address;
68 } 69 }
70 void set_dns_servers(const std::string& dns_servers) {
71 dns_servers_ = dns_servers;
72 }
69 73
70 // Common Network Service properties 74 // Common Network Service properties
71 std::string security_; 75 std::string security_;
72 std::string device_path_; 76 std::string device_path_;
73 std::string guid_; 77 std::string guid_;
74 std::string ip_address_;
75 std::string connection_state_; 78 std::string connection_state_;
76 std::string error_; 79 std::string error_;
80 // IPConfig properties.
81 // Note: These do not correspond to actual Shill.Service properties
82 // but are derived from the service's corresponding IPConfig object.
83 std::string ip_address_;
84 std::string dns_servers_;
stevenjb 2013/03/28 20:30:58 After further thought, I think Philipp is correct;
gauravsh 2013/03/29 00:02:11 As per offline discussion with Steven, I have chan
77 // Wireless properties 85 // Wireless properties
78 int signal_strength_; 86 int signal_strength_;
79 // Cellular properties 87 // Cellular properties
80 std::string technology_; 88 std::string technology_;
81 std::string activation_state_; 89 std::string activation_state_;
82 std::string roaming_; 90 std::string roaming_;
83 bool activate_over_non_cellular_networks_; 91 bool activate_over_non_cellular_networks_;
84 bool cellular_out_of_credits_; 92 bool cellular_out_of_credits_;
85 93
86 DISALLOW_COPY_AND_ASSIGN(NetworkState); 94 DISALLOW_COPY_AND_ASSIGN(NetworkState);
87 }; 95 };
88 96
89 } // namespace chromeos 97 } // namespace chromeos
90 98
91 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ 99 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698