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

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

Issue 14846004: Migrate ProxyConfigServiceImpl to NetworkStateHandler and NetworkProfileHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed profile_manager_unittest.cc Created 7 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
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "chromeos/network/managed_state.h" 12 #include "chromeos/network/managed_state.h"
13 #include "chromeos/network/onc/onc_constants.h"
13 14
14 namespace chromeos { 15 namespace chromeos {
15 16
16 // Simple class to provide network state information about a network service. 17 // Simple class to provide network state information about a network service.
17 // This class should always be passed as a const* and should never be held 18 // This class should always be passed as a const* and should never be held
18 // on to. Store network_state->path() (defined in ManagedState) instead and 19 // on to. Store network_state->path() (defined in ManagedState) instead and
19 // call NetworkStateHandler::GetNetworkState(path) to retrieve the state for 20 // call NetworkStateHandler::GetNetworkState(path) to retrieve the state for
20 // the network. 21 // the network.
21 class CHROMEOS_EXPORT NetworkState : public ManagedState { 22 class CHROMEOS_EXPORT NetworkState : public ManagedState {
22 public: 23 public:
(...skipping 18 matching lines...) Expand all
41 const std::string& device_path() const { return device_path_; } 42 const std::string& device_path() const { return device_path_; }
42 const std::string& guid() const { return guid_; } 43 const std::string& guid() const { return guid_; }
43 const std::string& connection_state() const { return connection_state_; } 44 const std::string& connection_state() const { return connection_state_; }
44 const std::string& profile_path() const { return profile_path_; } 45 const std::string& profile_path() const { return profile_path_; }
45 const std::string& error() const { return error_; } 46 const std::string& error() const { return error_; }
46 const std::string& error_details() const { return error_details_; } 47 const std::string& error_details() const { return error_details_; }
47 bool auto_connect() const { return auto_connect_; } 48 bool auto_connect() const { return auto_connect_; }
48 bool favorite() const { return favorite_; } 49 bool favorite() const { return favorite_; }
49 int priority() const { return priority_; } 50 int priority() const { return priority_; }
50 const base::DictionaryValue& proxy_config() const { return proxy_config_; } 51 const base::DictionaryValue& proxy_config() const { return proxy_config_; }
52 onc::ONCSource onc_source() const { return onc_source_; }
51 // Wireless property accessors 53 // Wireless property accessors
52 int signal_strength() const { return signal_strength_; } 54 int signal_strength() const { return signal_strength_; }
53 bool connectable() const { return connectable_; } 55 bool connectable() const { return connectable_; }
54 // Wifi property accessors 56 // Wifi property accessors
55 bool passphrase_required() const { return passphrase_required_; } 57 bool passphrase_required() const { return passphrase_required_; }
56 // Cellular property accessors 58 // Cellular property accessors
57 const std::string& technology() const { return technology_; } 59 const std::string& technology() const { return technology_; }
58 const std::string& activation_state() const { return activation_state_; } 60 const std::string& activation_state() const { return activation_state_; }
59 const std::string& roaming() const { return roaming_; } 61 const std::string& roaming() const { return roaming_; }
60 bool activate_over_non_cellular_networks() const { 62 bool activate_over_non_cellular_networks() const {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 std::string security_; 97 std::string security_;
96 std::string device_path_; 98 std::string device_path_;
97 std::string guid_; 99 std::string guid_;
98 std::string connection_state_; 100 std::string connection_state_;
99 std::string profile_path_; 101 std::string profile_path_;
100 std::string error_; 102 std::string error_;
101 std::string error_details_; 103 std::string error_details_;
102 bool auto_connect_; 104 bool auto_connect_;
103 bool favorite_; 105 bool favorite_;
104 int priority_; 106 int priority_;
105 // TODO(pneubeck): Remove this property once NetworkConfigurationHandler 107 // TODO(pneubeck): Remove ProxyConfig and ONCSource once
106 // provides proxy configuration. crbug/241775 108 // NetworkConfigurationHandler provides proxy configuration. crbug/241775
107 base::DictionaryValue proxy_config_; 109 base::DictionaryValue proxy_config_;
110 onc::ONCSource onc_source_;
108 // IPConfig properties. 111 // IPConfig properties.
109 // Note: These do not correspond to actual Shill.Service properties 112 // Note: These do not correspond to actual Shill.Service properties
110 // but are derived from the service's corresponding IPConfig object. 113 // but are derived from the service's corresponding IPConfig object.
111 std::string ip_address_; 114 std::string ip_address_;
112 std::vector<std::string> dns_servers_; 115 std::vector<std::string> dns_servers_;
113 // Wireless properties 116 // Wireless properties
114 int signal_strength_; 117 int signal_strength_;
115 bool connectable_; 118 bool connectable_;
116 // Wifi properties 119 // Wifi properties
117 std::string hex_ssid_; 120 std::string hex_ssid_;
118 std::string country_code_; 121 std::string country_code_;
119 bool passphrase_required_; 122 bool passphrase_required_;
120 // Cellular properties 123 // Cellular properties
121 std::string technology_; 124 std::string technology_;
122 std::string activation_state_; 125 std::string activation_state_;
123 std::string roaming_; 126 std::string roaming_;
124 bool activate_over_non_cellular_networks_; 127 bool activate_over_non_cellular_networks_;
125 bool cellular_out_of_credits_; 128 bool cellular_out_of_credits_;
126 129
127 DISALLOW_COPY_AND_ASSIGN(NetworkState); 130 DISALLOW_COPY_AND_ASSIGN(NetworkState);
128 }; 131 };
129 132
130 } // namespace chromeos 133 } // namespace chromeos
131 134
132 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ 135 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698