| 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 "chrome/browser/chromeos/login/helper.h" | 5 #include "chrome/browser/chromeos/login/helper.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 bool NetworkStateHelper::IsConnecting() const { | 193 bool NetworkStateHelper::IsConnecting() const { |
| 194 chromeos::NetworkStateHandler* nsh = | 194 chromeos::NetworkStateHandler* nsh = |
| 195 chromeos::NetworkHandler::Get()->network_state_handler(); | 195 chromeos::NetworkHandler::Get()->network_state_handler(); |
| 196 return nsh->ConnectingNetworkByType( | 196 return nsh->ConnectingNetworkByType( |
| 197 chromeos::NetworkTypePattern::Default()) != nullptr; | 197 chromeos::NetworkTypePattern::Default()) != nullptr; |
| 198 } | 198 } |
| 199 | 199 |
| 200 void NetworkStateHelper::OnCreateConfiguration( | 200 void NetworkStateHelper::OnCreateConfiguration( |
| 201 const base::Closure& success_callback, | 201 const base::Closure& success_callback, |
| 202 const base::Closure& error_callback, | 202 const base::Closure& error_callback, |
| 203 const std::string& service_path) const { | 203 const std::string& service_path, |
| 204 const std::string& guid) const { |
| 204 // Connect to the network. | 205 // Connect to the network. |
| 205 NetworkHandler::Get()->network_connection_handler()->ConnectToNetwork( | 206 NetworkHandler::Get()->network_connection_handler()->ConnectToNetwork( |
| 206 service_path, success_callback, | 207 service_path, success_callback, |
| 207 base::Bind(&NetworkStateHelper::OnCreateOrConnectNetworkFailed, | 208 base::Bind(&NetworkStateHelper::OnCreateOrConnectNetworkFailed, |
| 208 base::Unretained(this), error_callback), | 209 base::Unretained(this), error_callback), |
| 209 false); | 210 false); |
| 210 } | 211 } |
| 211 | 212 |
| 212 void NetworkStateHelper::OnCreateOrConnectNetworkFailed( | 213 void NetworkStateHelper::OnCreateOrConnectNetworkFailed( |
| 213 const base::Closure& error_callback, | 214 const base::Closure& error_callback, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 242 | 243 |
| 243 return signin_partition->GetURLRequestContext(); | 244 return signin_partition->GetURLRequestContext(); |
| 244 } | 245 } |
| 245 | 246 |
| 246 return ProfileHelper::GetSigninProfile()->GetRequestContext(); | 247 return ProfileHelper::GetSigninProfile()->GetRequestContext(); |
| 247 } | 248 } |
| 248 | 249 |
| 249 } // namespace login | 250 } // namespace login |
| 250 | 251 |
| 251 } // namespace chromeos | 252 } // namespace chromeos |
| OLD | NEW |