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

Unified Diff: chromeos/network/network_connection_handler.h

Issue 1353323002: Cleanup: Pass std::string as const reference from chromeos/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't use const& for NetworkConnectionHandler::CheckPendingRequest; Use one more const& in unittests 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/network/network_connection_handler.h
diff --git a/chromeos/network/network_connection_handler.h b/chromeos/network/network_connection_handler.h
index ddadf7a19e9df118f1cdb13cc07ba1b9847c1cbe..8b4e93f400d442c4865bb3382fd759b4ca751fe9 100644
--- a/chromeos/network/network_connection_handler.h
+++ b/chromeos/network/network_connection_handler.h
@@ -193,7 +193,11 @@ class CHROMEOS_EXPORT NetworkConnectionHandler
const std::string& error_name,
const std::string& error_message);
+ // Note: |service_path| is passed by value here, because in some cases
+ // the value may be located in the map and then it can be deleted, producing
+ // a reference to invalid memory.
void CheckPendingRequest(const std::string service_path);
+
void CheckAllPendingRequests();
// Notify caller and observers that the connect request succeeded.
« no previous file with comments | « chromeos/dbus/fake_shill_manager_client.cc ('k') | chromeos/network/onc/onc_certificate_importer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698