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

Unified Diff: components/cloud_devices/common/cloud_device_description.cc

Issue 1921973002: Convert //components/[a-e]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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: components/cloud_devices/common/cloud_device_description.cc
diff --git a/components/cloud_devices/common/cloud_device_description.cc b/components/cloud_devices/common/cloud_device_description.cc
index b69e2c43fc1b6fd04d8cc9004280d134f76f70ce..56cbb463bcc996993515a1ce18f6bf6170634eb6 100644
--- a/components/cloud_devices/common/cloud_device_description.cc
+++ b/components/cloud_devices/common/cloud_device_description.cc
@@ -9,6 +9,7 @@
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/values.h"
#include "components/cloud_devices/common/cloud_device_description_consts.h"
@@ -27,7 +28,7 @@ void CloudDeviceDescription::Reset() {
}
bool CloudDeviceDescription::InitFromDictionary(
- scoped_ptr<base::DictionaryValue> root) {
+ std::unique_ptr<base::DictionaryValue> root) {
if (!root)
return false;
Reset();
@@ -38,12 +39,12 @@ bool CloudDeviceDescription::InitFromDictionary(
}
bool CloudDeviceDescription::InitFromString(const std::string& json) {
- scoped_ptr<base::Value> parsed = base::JSONReader::Read(json);
+ std::unique_ptr<base::Value> parsed = base::JSONReader::Read(json);
base::DictionaryValue* description = NULL;
if (!parsed || !parsed->GetAsDictionary(&description))
return false;
ignore_result(parsed.release());
- return InitFromDictionary(make_scoped_ptr(description));
+ return InitFromDictionary(base::WrapUnique(description));
}
std::string CloudDeviceDescription::ToString() const {

Powered by Google App Engine
This is Rietveld 408576698