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

Unified Diff: third_party/libaddressinput/chromium/chrome_metadata_source.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_metadata_source.cc
diff --git a/third_party/libaddressinput/chromium/chrome_metadata_source.cc b/third_party/libaddressinput/chromium/chrome_metadata_source.cc
index 57c5acd4c2548b6f6d5af7cfc757909d32353c9b..c54f129fe1809c3a1a12c489f3ee20615a51e31b 100644
--- a/third_party/libaddressinput/chromium/chrome_metadata_source.cc
+++ b/third_party/libaddressinput/chromium/chrome_metadata_source.cc
@@ -4,11 +4,11 @@
#include "third_party/libaddressinput/chromium/chrome_metadata_source.h"
+#include <memory>
#include <utility>
#include "base/logging.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/stl_util.h"
#include "net/base/io_buffer.h"
#include "net/base/load_flags.h"
@@ -73,7 +73,7 @@ void ChromeMetadataSource::OnURLFetchComplete(const net::URLFetcher* source) {
DCHECK(request != requests_.end());
bool ok = source->GetResponseCode() == net::HTTP_OK;
- scoped_ptr<std::string> data(new std::string());
+ std::unique_ptr<std::string> data(new std::string());
if (ok)
data->swap(request->second->data);
request->second->callback(ok, request->second->key, data.release());
@@ -83,7 +83,7 @@ void ChromeMetadataSource::OnURLFetchComplete(const net::URLFetcher* source) {
}
ChromeMetadataSource::Request::Request(const std::string& key,
- scoped_ptr<net::URLFetcher> fetcher,
+ std::unique_ptr<net::URLFetcher> fetcher,
const Callback& callback)
: key(key), fetcher(std::move(fetcher)), callback(callback) {}
@@ -95,7 +95,7 @@ void ChromeMetadataSource::Download(const std::string& key,
return;
}
- scoped_ptr<net::URLFetcher> fetcher =
+ std::unique_ptr<net::URLFetcher> fetcher =
net::URLFetcher::Create(resource, net::URLFetcher::GET, this);
fetcher->SetLoadFlags(
net::LOAD_DO_NOT_SEND_COOKIES | net::LOAD_DO_NOT_SAVE_COOKIES);
@@ -103,7 +103,7 @@ void ChromeMetadataSource::Download(const std::string& key,
Request* request = new Request(key, std::move(fetcher), downloaded);
request->fetcher->SaveResponseWithWriter(
- scoped_ptr<net::URLFetcherResponseWriter>(
+ std::unique_ptr<net::URLFetcherResponseWriter>(
new UnownedStringWriter(&request->data)));
requests_[request->fetcher.get()] = request;
request->fetcher->Start();

Powered by Google App Engine
This is Rietveld 408576698