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

Unified Diff: chromeos/dbus/modem_messaging_client.cc

Issue 1454773002: Play better with C++11 library features from /chromeos (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « chromeos/dbus/gsm_sms_client.cc ('k') | chromeos/dbus/shill_ipconfig_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/modem_messaging_client.cc
diff --git a/chromeos/dbus/modem_messaging_client.cc b/chromeos/dbus/modem_messaging_client.cc
index 731adf90f478627169e4ea62ae00fa6ee050ed04..e7145422f1db6bd83f705662b3e5d5d2dc77f5f9 100644
--- a/chromeos/dbus/modem_messaging_client.cc
+++ b/chromeos/dbus/modem_messaging_client.cc
@@ -3,10 +3,10 @@
// found in the LICENSE file.
#include "chromeos/dbus/modem_messaging_client.h"
+#include <map>
#include <utility>
#include "base/bind.h"
-#include "base/containers/scoped_ptr_map.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
@@ -163,8 +163,8 @@ class CHROMEOS_EXPORT ModemMessagingClientImpl : public ModemMessagingClient {
void Init(dbus::Bus* bus) override { bus_ = bus; };
private:
- typedef base::ScopedPtrMap<std::pair<std::string, std::string>,
- scoped_ptr<ModemMessagingProxy>> ProxyMap;
+ using ProxyMap = std::map<std::pair<std::string, std::string>,
+ scoped_ptr<ModemMessagingProxy>>;
// Returns a SMSProxy for the given service name and object path.
ModemMessagingProxy* GetProxy(const std::string& service_name,
@@ -172,13 +172,13 @@ class CHROMEOS_EXPORT ModemMessagingClientImpl : public ModemMessagingClient {
const ProxyMap::key_type key(service_name, object_path.value());
ProxyMap::const_iterator it = proxies_.find(key);
if (it != proxies_.end())
- return it->second;
+ return it->second.get();
// There is no proxy for the service_name and object_path, create it.
scoped_ptr<ModemMessagingProxy> proxy(
new ModemMessagingProxy(bus_, service_name, object_path));
ModemMessagingProxy* proxy_ptr = proxy.get();
- proxies_.insert(key, proxy.Pass());
+ proxies_[key] = std::move(proxy);
return proxy_ptr;
}
« no previous file with comments | « chromeos/dbus/gsm_sms_client.cc ('k') | chromeos/dbus/shill_ipconfig_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698