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

Side by Side Diff: chromeos/network/network_connection_handler.cc

Issue 23522050: Provide Shill Error to failure notification (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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) 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 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 } 588 }
589 } 589 }
590 std::string error_msg = error_name + ": " + error_detail; 590 std::string error_msg = error_name + ": " + error_detail;
591 NET_LOG_ERROR(error_msg, service_path); 591 NET_LOG_ERROR(error_msg, service_path);
592 592
593 network_handler::ErrorCallback error_callback = request->error_callback; 593 network_handler::ErrorCallback error_callback = request->error_callback;
594 pending_requests_.erase(service_path); 594 pending_requests_.erase(service_path);
595 if (error_callback.is_null()) 595 if (error_callback.is_null())
596 return; 596 return;
597 scoped_ptr<base::DictionaryValue> error_data( 597 scoped_ptr<base::DictionaryValue> error_data(
598 network_handler::CreateErrorData(service_path, error_name, error_msg)); 598 network_handler::CreateErrorData(service_path, error_name, error_detail));
599 error_callback.Run(error_name, error_data.Pass()); 599 error_callback.Run(error_name, error_data.Pass());
600 } 600 }
601 601
602 void NetworkConnectionHandler::CheckAllPendingRequests() { 602 void NetworkConnectionHandler::CheckAllPendingRequests() {
603 for (std::map<std::string, ConnectRequest>::iterator iter = 603 for (std::map<std::string, ConnectRequest>::iterator iter =
604 pending_requests_.begin(); iter != pending_requests_.end(); ++iter) { 604 pending_requests_.begin(); iter != pending_requests_.end(); ++iter) {
605 CheckPendingRequest(iter->first); 605 CheckPendingRequest(iter->first);
606 } 606 }
607 } 607 }
608 608
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 650
651 void NetworkConnectionHandler::HandleShillDisconnectSuccess( 651 void NetworkConnectionHandler::HandleShillDisconnectSuccess(
652 const std::string& service_path, 652 const std::string& service_path,
653 const base::Closure& success_callback) { 653 const base::Closure& success_callback) {
654 NET_LOG_EVENT("Disconnect Request Sent", service_path); 654 NET_LOG_EVENT("Disconnect Request Sent", service_path);
655 if (!success_callback.is_null()) 655 if (!success_callback.is_null())
656 success_callback.Run(); 656 success_callback.Run();
657 } 657 }
658 658
659 } // namespace chromeos 659 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698