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

Unified Diff: chrome/service/service_process_prefs.cc

Issue 1899083002: Convert //chrome 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
« no previous file with comments | « chrome/service/service_process_prefs.h ('k') | chrome/service/service_process_prefs_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/service_process_prefs.cc
diff --git a/chrome/service/service_process_prefs.cc b/chrome/service/service_process_prefs.cc
index 7cbfda7bcd3754d20830a2c6fd9cce2a47dca0b1..33846a61e31af3a49fbb64ad07e750428a24222f 100644
--- a/chrome/service/service_process_prefs.cc
+++ b/chrome/service/service_process_prefs.cc
@@ -6,17 +6,16 @@
#include <utility>
+#include "base/memory/ptr_util.h"
#include "base/thread_task_runner_handle.h"
#include "base/values.h"
#include "components/prefs/pref_filter.h"
-ServiceProcessPrefs::ServiceProcessPrefs(
- const base::FilePath& pref_filename,
- base::SequencedTaskRunner* task_runner)
+ServiceProcessPrefs::ServiceProcessPrefs(const base::FilePath& pref_filename,
+ base::SequencedTaskRunner* task_runner)
: prefs_(new JsonPrefStore(pref_filename,
task_runner,
- scoped_ptr<PrefFilter>())) {
-}
+ std::unique_ptr<PrefFilter>())) {}
ServiceProcessPrefs::~ServiceProcessPrefs() {}
@@ -41,7 +40,7 @@ std::string ServiceProcessPrefs::GetString(
void ServiceProcessPrefs::SetString(const std::string& key,
const std::string& value) {
- prefs_->SetValue(key, make_scoped_ptr(new base::StringValue(value)),
+ prefs_->SetValue(key, base::WrapUnique(new base::StringValue(value)),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
}
@@ -56,7 +55,7 @@ bool ServiceProcessPrefs::GetBoolean(const std::string& key,
}
void ServiceProcessPrefs::SetBoolean(const std::string& key, bool value) {
- prefs_->SetValue(key, make_scoped_ptr(new base::FundamentalValue(value)),
+ prefs_->SetValue(key, base::WrapUnique(new base::FundamentalValue(value)),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
}
@@ -71,7 +70,7 @@ int ServiceProcessPrefs::GetInt(const std::string& key,
}
void ServiceProcessPrefs::SetInt(const std::string& key, int value) {
- prefs_->SetValue(key, make_scoped_ptr(new base::FundamentalValue(value)),
+ prefs_->SetValue(key, base::WrapUnique(new base::FundamentalValue(value)),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
}
@@ -96,7 +95,7 @@ const base::ListValue* ServiceProcessPrefs::GetList(
}
void ServiceProcessPrefs::SetValue(const std::string& key,
- scoped_ptr<base::Value> value) {
+ std::unique_ptr<base::Value> value) {
prefs_->SetValue(key, std::move(value),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
}
« no previous file with comments | « chrome/service/service_process_prefs.h ('k') | chrome/service/service_process_prefs_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698