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

Unified Diff: chromeos/dbus/gsm_sms_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 | « no previous file | chromeos/dbus/modem_messaging_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/gsm_sms_client.cc
diff --git a/chromeos/dbus/gsm_sms_client.cc b/chromeos/dbus/gsm_sms_client.cc
index c996e9e014a7bdd33ec0fad58e18d8defd17e909..4ca1b430caf554024c0c2e03b07b1b71dafe1551 100644
--- a/chromeos/dbus/gsm_sms_client.cc
+++ b/chromeos/dbus/gsm_sms_client.cc
@@ -3,11 +3,11 @@
// found in the LICENSE file.
#include "chromeos/dbus/gsm_sms_client.h"
+#include <map>
#include <utility>
#include <vector>
#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"
@@ -207,8 +207,8 @@ class GsmSMSClientImpl : public GsmSMSClient {
void Init(dbus::Bus* bus) override { bus_ = bus; }
private:
- typedef base::ScopedPtrMap<std::pair<std::string, std::string>,
- scoped_ptr<SMSProxy>> ProxyMap;
+ using ProxyMap =
+ std::map<std::pair<std::string, std::string>, scoped_ptr<SMSProxy>>;
// Returns a SMSProxy for the given service name and object path.
SMSProxy* GetProxy(const std::string& service_name,
@@ -216,12 +216,12 @@ class GsmSMSClientImpl : public GsmSMSClient {
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<SMSProxy> proxy(new SMSProxy(bus_, service_name, object_path));
SMSProxy* proxy_ptr = proxy.get();
- proxies_.insert(key, proxy.Pass());
+ proxies_[key] = std::move(proxy);
return proxy_ptr;
}
« no previous file with comments | « no previous file | chromeos/dbus/modem_messaging_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698