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

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

Issue 23551004: Move Shill property utility functions to a new separate file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 3 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
« no previous file with comments | « chromeos/network/network_connection_handler.cc ('k') | chromeos/network/network_state.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 std::string GetNetmask() const; 98 std::string GetNetmask() const;
99 99
100 // Helpers (used e.g. when a state is cached) 100 // Helpers (used e.g. when a state is cached)
101 static bool StateIsConnected(const std::string& connection_state); 101 static bool StateIsConnected(const std::string& connection_state);
102 static bool StateIsConnecting(const std::string& connection_state); 102 static bool StateIsConnecting(const std::string& connection_state);
103 103
104 // Helper to return a full prefixed version of an IPConfig property 104 // Helper to return a full prefixed version of an IPConfig property
105 // key. 105 // key.
106 static std::string IPConfigProperty(const char* key); 106 static std::string IPConfigProperty(const char* key);
107 107
108 // Sets |out| to the UIData specified by |value|. Returns true if successfully
109 // parsed.
110 static bool GetUIDataFromValue(const base::Value& value, NetworkUIData* out);
111
112 // Generates a name from properties."Wifi.HexSSID" if present, otherwise
113 // validates properties.Name and returns a valid utf8 version.
114 static std::string GetNameFromProperties(
115 const std::string& service_path,
116 const base::DictionaryValue& properties);
117 108
118 private: 109 private:
119 friend class MobileActivatorTest; 110 friend class MobileActivatorTest;
120 friend class NetworkStateHandler; 111 friend class NetworkStateHandler;
121 friend class NetworkChangeNotifierChromeosUpdateTest; 112 friend class NetworkChangeNotifierChromeosUpdateTest;
122 113
123 // Updates |name_| from WiFi.HexSSID if provided, and validates |name_|. 114 // Updates |name_| from WiFi.HexSSID if provided, and validates |name_|.
124 // Returns true if |name_| changes. 115 // Returns true if |name_| changes.
125 bool UpdateName(const base::DictionaryValue& properties); 116 bool UpdateName(const base::DictionaryValue& properties);
126 117
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // Whether a deprecated CaCertNSS property of this network is set. Required 157 // Whether a deprecated CaCertNSS property of this network is set. Required
167 // for migration to PEM. 158 // for migration to PEM.
168 bool has_ca_cert_nss_; 159 bool has_ca_cert_nss_;
169 160
170 DISALLOW_COPY_AND_ASSIGN(NetworkState); 161 DISALLOW_COPY_AND_ASSIGN(NetworkState);
171 }; 162 };
172 163
173 } // namespace chromeos 164 } // namespace chromeos
174 165
175 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ 166 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_
OLDNEW
« no previous file with comments | « chromeos/network/network_connection_handler.cc ('k') | chromeos/network/network_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698