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

Unified Diff: extensions/browser/value_store/value_store_frontend.cc

Issue 1909773002: Convert //extensions/browser 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: extensions/browser/value_store/value_store_frontend.cc
diff --git a/extensions/browser/value_store/value_store_frontend.cc b/extensions/browser/value_store/value_store_frontend.cc
index b3912d6febb66adea9b986363c65f21c157d0d19..ccd50403706c9dee3c3ec504b080914851ce644e 100644
--- a/extensions/browser/value_store/value_store_frontend.cc
+++ b/extensions/browser/value_store/value_store_frontend.cc
@@ -32,7 +32,7 @@ class ValueStoreFrontend::Backend : public base::RefCountedThreadSafe<Backend> {
// Extract the value from the ReadResult and pass ownership of it to the
// callback.
- scoped_ptr<base::Value> value;
+ std::unique_ptr<base::Value> value;
if (result->status().ok()) {
result->settings().RemoveWithoutPathExpansion(key, &value);
} else {
@@ -45,7 +45,7 @@ class ValueStoreFrontend::Backend : public base::RefCountedThreadSafe<Backend> {
this, callback, base::Passed(&value)));
}
- void Set(const std::string& key, scoped_ptr<base::Value> value) {
+ void Set(const std::string& key, std::unique_ptr<base::Value> value) {
DCHECK_CURRENTLY_ON(BrowserThread::FILE);
LazyInit();
// We don't need the old value, so skip generating changes.
@@ -88,7 +88,7 @@ class ValueStoreFrontend::Backend : public base::RefCountedThreadSafe<Backend> {
}
void RunCallback(const ValueStoreFrontend::ReadCallback& callback,
- scoped_ptr<base::Value> value) {
+ std::unique_ptr<base::Value> value) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
callback.Run(std::move(value));
}
@@ -100,7 +100,7 @@ class ValueStoreFrontend::Backend : public base::RefCountedThreadSafe<Backend> {
// The actual ValueStore that handles persisting the data to disk. Used
// exclusively on the FILE thread.
- scoped_ptr<ValueStore> storage_;
+ std::unique_ptr<ValueStore> storage_;
base::FilePath db_path_;
@@ -126,7 +126,7 @@ void ValueStoreFrontend::Get(const std::string& key,
}
void ValueStoreFrontend::Set(const std::string& key,
- scoped_ptr<base::Value> value) {
+ std::unique_ptr<base::Value> value) {
DCHECK(CalledOnValidThread());
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
« no previous file with comments | « extensions/browser/value_store/value_store_frontend.h ('k') | extensions/browser/value_store/value_store_frontend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698