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

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

Issue 267433005: Provide IPConfigs in networkingPrivate.GetProperties (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + Elim DHCP ONC types Created 6 years, 7 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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 21 matching lines...) Expand all
32 32
33 // ManagedState overrides 33 // ManagedState overrides
34 // If you change this method, update GetProperties too. 34 // If you change this method, update GetProperties too.
35 virtual bool PropertyChanged(const std::string& key, 35 virtual bool PropertyChanged(const std::string& key,
36 const base::Value& value) OVERRIDE; 36 const base::Value& value) OVERRIDE;
37 virtual bool InitialPropertiesReceived( 37 virtual bool InitialPropertiesReceived(
38 const base::DictionaryValue& properties) OVERRIDE; 38 const base::DictionaryValue& properties) OVERRIDE;
39 virtual void GetStateProperties( 39 virtual void GetStateProperties(
40 base::DictionaryValue* dictionary) const OVERRIDE; 40 base::DictionaryValue* dictionary) const OVERRIDE;
41 41
42 void IPConfigPropertiesChanged(const base::DictionaryValue& properties);
43
42 // Returns true, if the network requires a service activation. 44 // Returns true, if the network requires a service activation.
43 bool RequiresActivation() const; 45 bool RequiresActivation() const;
44 46
45 // Accessors 47 // Accessors
46 const std::string& security() const { return security_; } 48 const std::string& security() const { return security_; }
47 const std::string& device_path() const { return device_path_; } 49 const std::string& device_path() const { return device_path_; }
48 const std::string& guid() const { return guid_; } 50 const std::string& guid() const { return guid_; }
49 const std::string& connection_state() const { return connection_state_; } 51 const std::string& connection_state() const { return connection_state_; }
50 const std::string& profile_path() const { return profile_path_; } 52 const std::string& profile_path() const { return profile_path_; }
51 const std::string& error() const { return error_; } 53 const std::string& error() const { return error_; }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 std::string GetDnsServersAsString() const; 97 std::string GetDnsServersAsString() const;
96 98
97 // Converts the prefix length to a netmask string. 99 // Converts the prefix length to a netmask string.
98 std::string GetNetmask() const; 100 std::string GetNetmask() const;
99 101
100 // Helpers (used e.g. when a state or error is cached) 102 // Helpers (used e.g. when a state or error is cached)
101 static bool StateIsConnected(const std::string& connection_state); 103 static bool StateIsConnected(const std::string& connection_state);
102 static bool StateIsConnecting(const std::string& connection_state); 104 static bool StateIsConnecting(const std::string& connection_state);
103 static bool ErrorIsValid(const std::string& error); 105 static bool ErrorIsValid(const std::string& error);
104 106
105 // Helper to return a full prefixed version of an IPConfig property key.
106 static std::string IPConfigProperty(const char* key);
107
108
109 private: 107 private:
110 friend class MobileActivatorTest; 108 friend class MobileActivatorTest;
111 friend class NetworkStateHandler; 109 friend class NetworkStateHandler;
112 friend class NetworkChangeNotifierChromeosUpdateTest; 110 friend class NetworkChangeNotifierChromeosUpdateTest;
113 111
114 // Updates |name_| from WiFi.HexSSID if provided, and validates |name_|. 112 // Updates |name_| from WiFi.HexSSID if provided, and validates |name_|.
115 // Returns true if |name_| changes. 113 // Returns true if |name_| changes.
116 bool UpdateName(const base::DictionaryValue& properties); 114 bool UpdateName(const base::DictionaryValue& properties);
117 115
118 // Network Service properties. Avoid adding any additional properties here. 116 // Network Service properties. Avoid adding any additional properties here.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 // Whether a deprecated CaCertNSS property of this network is set. Required 158 // Whether a deprecated CaCertNSS property of this network is set. Required
161 // for migration to PEM. 159 // for migration to PEM.
162 bool has_ca_cert_nss_; 160 bool has_ca_cert_nss_;
163 161
164 DISALLOW_COPY_AND_ASSIGN(NetworkState); 162 DISALLOW_COPY_AND_ASSIGN(NetworkState);
165 }; 163 };
166 164
167 } // namespace chromeos 165 } // namespace chromeos
168 166
169 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ 167 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698