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

Unified Diff: chrome/browser/chromeos/extensions/default_app_order.cc

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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/chromeos/extensions/default_app_order.cc
diff --git a/chrome/browser/chromeos/extensions/default_app_order.cc b/chrome/browser/chromeos/extensions/default_app_order.cc
index 69bb7e1bcbd9a9c94af68c081bc6fb80b62eb137..ee118046e77f1fd1674c1cef009236450343eb97 100644
--- a/chrome/browser/chromeos/extensions/default_app_order.cc
+++ b/chrome/browser/chromeos/extensions/default_app_order.cc
@@ -61,21 +61,22 @@ const char* const kDefaultAppOrder[] = {
// Reads external ordinal json file and returned the parsed value. Returns NULL
// if the file does not exist or could not be parsed properly. Caller takes
// ownership of the returned value.
-scoped_ptr<base::ListValue> ReadExternalOrdinalFile(
+std::unique_ptr<base::ListValue> ReadExternalOrdinalFile(
const base::FilePath& path) {
if (!base::PathExists(path))
return NULL;
JSONFileValueDeserializer deserializer(path);
std::string error_msg;
- scoped_ptr<base::Value> value = deserializer.Deserialize(NULL, &error_msg);
+ std::unique_ptr<base::Value> value =
+ deserializer.Deserialize(NULL, &error_msg);
if (!value) {
LOG(WARNING) << "Unable to deserialize default app ordinals json data:"
<< error_msg << ", file=" << path.value();
return NULL;
}
- scoped_ptr<base::ListValue> ordinal_list_value =
+ std::unique_ptr<base::ListValue> ordinal_list_value =
base::ListValue::From(std::move(value));
if (!ordinal_list_value)
LOG(WARNING) << "Expect a JSON list in file " << path.value();
@@ -154,7 +155,7 @@ void ExternalLoader::Load() {
base::FilePath ordinals_file;
CHECK(PathService::Get(chromeos::FILE_DEFAULT_APP_ORDER, &ordinals_file));
- scoped_ptr<base::ListValue> ordinals_value =
+ std::unique_ptr<base::ListValue> ordinals_value =
ReadExternalOrdinalFile(ordinals_file);
if (ordinals_value) {
std::string locale = g_browser_process->GetApplicationLocale();

Powered by Google App Engine
This is Rietveld 408576698