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

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

Issue 1043343002: Use networkingPrivate.startConnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_430115_internet_options_cellular
Patch Set: Separate out logic and use last_error Created 5 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
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 std::string GetNetmask() const; 119 std::string GetNetmask() const;
120 120
121 // Returns a specifier for identifying this network in the absence of a GUID. 121 // Returns a specifier for identifying this network in the absence of a GUID.
122 // This should only be used by NetworkStateHandler for keeping track of 122 // This should only be used by NetworkStateHandler for keeping track of
123 // GUIDs assigned to unsaved networks. 123 // GUIDs assigned to unsaved networks.
124 std::string GetSpecifier() const; 124 std::string GetSpecifier() const;
125 125
126 // Set the GUID. Called exclusively by NetworkStateHandler. 126 // Set the GUID. Called exclusively by NetworkStateHandler.
127 void SetGuid(const std::string& guid); 127 void SetGuid(const std::string& guid);
128 128
129 // Retirns |error_| if valid, otherwise returns |last_error_|.
130 std::string GetErrorState() const;
131
129 // Helpers (used e.g. when a state, error, or shill dictionary is cached) 132 // Helpers (used e.g. when a state, error, or shill dictionary is cached)
130 static bool StateIsConnected(const std::string& connection_state); 133 static bool StateIsConnected(const std::string& connection_state);
131 static bool StateIsConnecting(const std::string& connection_state); 134 static bool StateIsConnecting(const std::string& connection_state);
132 static bool NetworkStateIsCaptivePortal( 135 static bool NetworkStateIsCaptivePortal(
133 const base::DictionaryValue& shill_properties); 136 const base::DictionaryValue& shill_properties);
134 static bool ErrorIsValid(const std::string& error); 137 static bool ErrorIsValid(const std::string& error);
135 138
136 private: 139 private:
137 friend class MobileActivatorTest; 140 friend class MobileActivatorTest;
138 friend class NetworkStateHandler; 141 friend class NetworkStateHandler;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 // TODO(pneubeck): Remove this once (Managed)NetworkConfigurationHandler 197 // TODO(pneubeck): Remove this once (Managed)NetworkConfigurationHandler
195 // provides proxy configuration. crbug.com/241775 198 // provides proxy configuration. crbug.com/241775
196 base::DictionaryValue proxy_config_; 199 base::DictionaryValue proxy_config_;
197 200
198 DISALLOW_COPY_AND_ASSIGN(NetworkState); 201 DISALLOW_COPY_AND_ASSIGN(NetworkState);
199 }; 202 };
200 203
201 } // namespace chromeos 204 } // namespace chromeos
202 205
203 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ 206 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698