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 "chromeos/network/network_connection_handler.h" | 5 #include "chromeos/network/network_connection_handler.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 "chromeos/chromeos_switches.h" | 10 #include "chromeos/chromeos_switches.h" |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 } | 586 } |
587 } | 587 } |
588 std::string error_msg = error_name + ": " + error_detail; | 588 std::string error_msg = error_name + ": " + error_detail; |
589 NET_LOG_ERROR(error_msg, service_path); | 589 NET_LOG_ERROR(error_msg, service_path); |
590 | 590 |
591 network_handler::ErrorCallback error_callback = request->error_callback; | 591 network_handler::ErrorCallback error_callback = request->error_callback; |
592 pending_requests_.erase(service_path); | 592 pending_requests_.erase(service_path); |
593 if (error_callback.is_null()) | 593 if (error_callback.is_null()) |
594 return; | 594 return; |
595 scoped_ptr<base::DictionaryValue> error_data( | 595 scoped_ptr<base::DictionaryValue> error_data( |
596 network_handler::CreateErrorData(service_path, error_name, error_msg)); | 596 network_handler::CreateErrorData(service_path, error_name, error_detail)); |
597 error_callback.Run(error_name, error_data.Pass()); | 597 error_callback.Run(error_name, error_data.Pass()); |
598 } | 598 } |
599 | 599 |
600 void NetworkConnectionHandler::CheckAllPendingRequests() { | 600 void NetworkConnectionHandler::CheckAllPendingRequests() { |
601 for (std::map<std::string, ConnectRequest>::iterator iter = | 601 for (std::map<std::string, ConnectRequest>::iterator iter = |
602 pending_requests_.begin(); iter != pending_requests_.end(); ++iter) { | 602 pending_requests_.begin(); iter != pending_requests_.end(); ++iter) { |
603 CheckPendingRequest(iter->first); | 603 CheckPendingRequest(iter->first); |
604 } | 604 } |
605 } | 605 } |
606 | 606 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 | 648 |
649 void NetworkConnectionHandler::HandleShillDisconnectSuccess( | 649 void NetworkConnectionHandler::HandleShillDisconnectSuccess( |
650 const std::string& service_path, | 650 const std::string& service_path, |
651 const base::Closure& success_callback) { | 651 const base::Closure& success_callback) { |
652 NET_LOG_EVENT("Disconnect Request Sent", service_path); | 652 NET_LOG_EVENT("Disconnect Request Sent", service_path); |
653 if (!success_callback.is_null()) | 653 if (!success_callback.is_null()) |
654 success_callback.Run(); | 654 success_callback.Run(); |
655 } | 655 } |
656 | 656 |
657 } // namespace chromeos | 657 } // namespace chromeos |
OLD | NEW |