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

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

Issue 1349783006: Cleanup: Pass std::string as const reference if possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert third_party changes Created 5 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
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/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 error = kErrorConnecting; 649 error = kErrorConnecting;
650 } else { 650 } else {
651 NET_LOG_ERROR("Connect Failure, Shill error: " + dbus_error_name, 651 NET_LOG_ERROR("Connect Failure, Shill error: " + dbus_error_name,
652 service_path); 652 service_path);
653 error = kErrorConnectFailed; 653 error = kErrorConnectFailed;
654 } 654 }
655 InvokeConnectErrorCallback(service_path, error_callback, error); 655 InvokeConnectErrorCallback(service_path, error_callback, error);
656 } 656 }
657 657
658 void NetworkConnectionHandler::CheckPendingRequest( 658 void NetworkConnectionHandler::CheckPendingRequest(
659 const std::string service_path) { 659 const std::string& service_path) {
660 ConnectRequest* request = GetPendingRequest(service_path); 660 ConnectRequest* request = GetPendingRequest(service_path);
661 DCHECK(request); 661 DCHECK(request);
662 if (request->connect_state == ConnectRequest::CONNECT_REQUESTED) 662 if (request->connect_state == ConnectRequest::CONNECT_REQUESTED)
663 return; // Request has not started, ignore update 663 return; // Request has not started, ignore update
664 const NetworkState* network = 664 const NetworkState* network =
665 network_state_handler_->GetNetworkState(service_path); 665 network_state_handler_->GetNetworkState(service_path);
666 if (!network) 666 if (!network)
667 return; // NetworkState may not be be updated yet. 667 return; // NetworkState may not be be updated yet.
668 668
669 if (network->IsConnectingState()) { 669 if (network->IsConnectingState()) {
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 772
773 void NetworkConnectionHandler::HandleShillDisconnectSuccess( 773 void NetworkConnectionHandler::HandleShillDisconnectSuccess(
774 const std::string& service_path, 774 const std::string& service_path,
775 const base::Closure& success_callback) { 775 const base::Closure& success_callback) {
776 NET_LOG_EVENT("Disconnect Request Sent", service_path); 776 NET_LOG_EVENT("Disconnect Request Sent", service_path);
777 if (!success_callback.is_null()) 777 if (!success_callback.is_null())
778 success_callback.Run(); 778 success_callback.Run();
779 } 779 }
780 780
781 } // namespace chromeos 781 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698