| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "ash/system/chromeos/network/network_connect.h" | 5 #include "ash/system/chromeos/network/network_connect.h" |
| 6 | 6 |
| 7 #include "ash/session_state_delegate.h" | 7 #include "ash/session_state_delegate.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/system/chromeos/network/network_state_notifier.h" | 9 #include "ash/system/chromeos/network/network_state_notifier.h" |
| 10 #include "ash/system/system_notifier.h" | 10 #include "ash/system/system_notifier.h" |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 base::Bind(&CallConnectToNetwork, | 265 base::Bind(&CallConnectToNetwork, |
| 266 service_path, check_error_state, | 266 service_path, check_error_state, |
| 267 parent_window), | 267 parent_window), |
| 268 base::Bind(&SetPropertiesFailed, "ClearProperties", service_path)); | 268 base::Bind(&SetPropertiesFailed, "ClearProperties", service_path)); |
| 269 } | 269 } |
| 270 | 270 |
| 271 // Returns false if !shared and no valid profile is available, which will | 271 // Returns false if !shared and no valid profile is available, which will |
| 272 // trigger an error and abort. | 272 // trigger an error and abort. |
| 273 bool GetNetworkProfilePath(bool shared, std::string* profile_path) { | 273 bool GetNetworkProfilePath(bool shared, std::string* profile_path) { |
| 274 if (shared) { | 274 if (shared) { |
| 275 *profile_path = NetworkProfileHandler::kSharedProfilePath; | 275 *profile_path = NetworkProfileHandler::GetSharedProfilePath(); |
| 276 return true; | 276 return true; |
| 277 } | 277 } |
| 278 | 278 |
| 279 if (!chromeos::LoginState::Get()->IsUserAuthenticated()) { | 279 if (!chromeos::LoginState::Get()->IsUserAuthenticated()) { |
| 280 NET_LOG_ERROR("User profile specified before login", ""); | 280 NET_LOG_ERROR("User profile specified before login", ""); |
| 281 return false; | 281 return false; |
| 282 } | 282 } |
| 283 | 283 |
| 284 const NetworkProfile* profile = | 284 const NetworkProfile* profile = |
| 285 NetworkHandler::Get()->network_profile_handler()-> | 285 NetworkHandler::Get()->network_profile_handler()-> |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 | 570 |
| 571 void ShowNetworkSettings(const std::string& service_path) { | 571 void ShowNetworkSettings(const std::string& service_path) { |
| 572 if (!ash::Shell::HasInstance()) | 572 if (!ash::Shell::HasInstance()) |
| 573 return; | 573 return; |
| 574 ash::Shell::GetInstance()->system_tray_delegate()->ShowNetworkSettings( | 574 ash::Shell::GetInstance()->system_tray_delegate()->ShowNetworkSettings( |
| 575 service_path); | 575 service_path); |
| 576 } | 576 } |
| 577 | 577 |
| 578 } // network_connect | 578 } // network_connect |
| 579 } // ash | 579 } // ash |
| OLD | NEW |