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

Unified Diff: chrome/browser/extensions/api/signed_in_devices/id_mapping_helper.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header Created 4 years, 8 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: chrome/browser/extensions/api/signed_in_devices/id_mapping_helper.cc
diff --git a/chrome/browser/extensions/api/signed_in_devices/id_mapping_helper.cc b/chrome/browser/extensions/api/signed_in_devices/id_mapping_helper.cc
index fec05460672c5f2ebfdf42c86ee9c0fde0f491a6..726df26e3373d9cdc5f3d30a26176ed7a17d1d81 100644
--- a/chrome/browser/extensions/api/signed_in_devices/id_mapping_helper.cc
+++ b/chrome/browser/extensions/api/signed_in_devices/id_mapping_helper.cc
@@ -4,7 +4,8 @@
#include "chrome/browser/extensions/api/signed_in_devices/id_mapping_helper.h"
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
#include "base/memory/scoped_vector.h"
#include "base/rand_util.h"
#include "base/strings/string_number_conversions.h"
@@ -84,7 +85,7 @@ void CreateMappingForUnmappedDevices(
}
}
-scoped_ptr<DeviceInfo> GetDeviceInfoForClientId(
+std::unique_ptr<DeviceInfo> GetDeviceInfoForClientId(
const std::string& client_id,
const std::string& extension_id,
Profile* profile) {
@@ -96,12 +97,12 @@ scoped_ptr<DeviceInfo> GetDeviceInfoForClientId(
it != devices.end();
++it) {
if ((*it)->guid() == client_id) {
- scoped_ptr<DeviceInfo> device(*it);
+ std::unique_ptr<DeviceInfo> device(*it);
devices.weak_erase(it);
return device;
}
}
- return scoped_ptr<DeviceInfo>();
+ return std::unique_ptr<DeviceInfo>();
}
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698