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

Unified Diff: third_party/libaddressinput/chromium/chrome_storage_impl.cc

Issue 1911823002: Convert //third_party from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update crashpad's README.chromium 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: third_party/libaddressinput/chromium/chrome_storage_impl.cc
diff --git a/third_party/libaddressinput/chromium/chrome_storage_impl.cc b/third_party/libaddressinput/chromium/chrome_storage_impl.cc
index 918d3f2ee01e54f1424c89a7595ff48264df2c78..e901c2fdfe5c0f43c8844baa830adfa3c78c8af3 100644
--- a/third_party/libaddressinput/chromium/chrome_storage_impl.cc
+++ b/third_party/libaddressinput/chromium/chrome_storage_impl.cc
@@ -4,9 +4,9 @@
#include "third_party/libaddressinput/chromium/chrome_storage_impl.h"
+#include <memory>
#include <utility>
-#include "base/memory/scoped_ptr.h"
#include "base/values.h"
#include "components/prefs/writeable_pref_store.h"
#include "third_party/libaddressinput/chromium/fallback_data_store.h"
@@ -23,8 +23,8 @@ ChromeStorageImpl::~ChromeStorageImpl() {}
void ChromeStorageImpl::Put(const std::string& key, std::string* data) {
DCHECK(data);
- scoped_ptr<std::string> owned_data(data);
- scoped_ptr<base::StringValue> string_value(
+ std::unique_ptr<std::string> owned_data(data);
+ std::unique_ptr<base::StringValue> string_value(
new base::StringValue(std::string()));
string_value->GetString()->swap(*owned_data);
backing_store_->SetValue(key, std::move(string_value),
@@ -56,7 +56,7 @@ void ChromeStorageImpl::DoGet(const std::string& key,
}
const base::Value* value = NULL;
- scoped_ptr<std::string> data(new std::string);
+ std::unique_ptr<std::string> data(new std::string);
if (backing_store_->GetValue(key, &value) && value->GetAsString(data.get())) {
data_ready(true, key, data.release());
} else if (FallbackDataStore::Get(key, data.get())) {

Powered by Google App Engine
This is Rietveld 408576698