| OLD | NEW |
| 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 #include "chromeos/network/network_state.h" | 5 #include "chromeos/network/network_state.h" |
| 6 | 6 |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chromeos/network/network_event_log.h" | 9 #include "chromeos/network/network_event_log.h" |
| 10 #include "chromeos/network/network_profile_handler.h" | 10 #include "chromeos/network/network_profile_handler.h" |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 bool NetworkState::IsConnectedState() const { | 229 bool NetworkState::IsConnectedState() const { |
| 230 return StateIsConnected(connection_state_); | 230 return StateIsConnected(connection_state_); |
| 231 } | 231 } |
| 232 | 232 |
| 233 bool NetworkState::IsConnectingState() const { | 233 bool NetworkState::IsConnectingState() const { |
| 234 return StateIsConnecting(connection_state_); | 234 return StateIsConnecting(connection_state_); |
| 235 } | 235 } |
| 236 | 236 |
| 237 bool NetworkState::IsPrivate() const { | 237 bool NetworkState::IsPrivate() const { |
| 238 return !profile_path_.empty() && | 238 return !profile_path_.empty() && |
| 239 profile_path_ != NetworkProfileHandler::kSharedProfilePath; | 239 profile_path_ != NetworkProfileHandler::GetSharedProfilePath(); |
| 240 } | 240 } |
| 241 | 241 |
| 242 std::string NetworkState::GetDnsServersAsString() const { | 242 std::string NetworkState::GetDnsServersAsString() const { |
| 243 std::string result; | 243 std::string result; |
| 244 for (size_t i = 0; i < dns_servers_.size(); ++i) { | 244 for (size_t i = 0; i < dns_servers_.size(); ++i) { |
| 245 if (i != 0) | 245 if (i != 0) |
| 246 result += ","; | 246 result += ","; |
| 247 result += dns_servers_[i]; | 247 result += dns_servers_[i]; |
| 248 } | 248 } |
| 249 return result; | 249 return result; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 276 connection_state == shill::kStateConfiguration || | 276 connection_state == shill::kStateConfiguration || |
| 277 connection_state == shill::kStateCarrier); | 277 connection_state == shill::kStateCarrier); |
| 278 } | 278 } |
| 279 | 279 |
| 280 // static | 280 // static |
| 281 std::string NetworkState::IPConfigProperty(const char* key) { | 281 std::string NetworkState::IPConfigProperty(const char* key) { |
| 282 return base::StringPrintf("%s.%s", shill::kIPConfigProperty, key); | 282 return base::StringPrintf("%s.%s", shill::kIPConfigProperty, key); |
| 283 } | 283 } |
| 284 | 284 |
| 285 } // namespace chromeos | 285 } // namespace chromeos |
| OLD | NEW |