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

Unified Diff: chrome/browser/chromeos/platform_keys/platform_keys.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/platform_keys/platform_keys.cc
diff --git a/chrome/browser/chromeos/platform_keys/platform_keys.cc b/chrome/browser/chromeos/platform_keys/platform_keys.cc
index 40cb72ccc6f3de8c4f1afb7f44aa791a1e140951..f026447c9844c62febd36457a5ff1f390447110b 100644
--- a/chrome/browser/chromeos/platform_keys/platform_keys.cc
+++ b/chrome/browser/chromeos/platform_keys/platform_keys.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/location.h"
+#include "base/memory/ptr_util.h"
#include "base/threading/worker_pool.h"
#include "net/base/hash_value.h"
#include "net/cert/x509_certificate.h"
@@ -58,15 +59,16 @@ ClientCertificateRequest::~ClientCertificateRequest() {
void IntersectCertificates(
const net::CertificateList& certs1,
const net::CertificateList& certs2,
- const base::Callback<void(scoped_ptr<net::CertificateList>)>& callback) {
- scoped_ptr<net::CertificateList> intersection(new net::CertificateList);
+ const base::Callback<void(std::unique_ptr<net::CertificateList>)>&
+ callback) {
+ std::unique_ptr<net::CertificateList> intersection(new net::CertificateList);
net::CertificateList* const intersection_ptr = intersection.get();
if (!base::WorkerPool::PostTaskAndReply(
FROM_HERE, base::Bind(&IntersectOnWorkerThread, certs1, certs2,
intersection_ptr),
base::Bind(callback, base::Passed(&intersection)),
false /* task_is_slow */)) {
- callback.Run(make_scoped_ptr(new net::CertificateList));
+ callback.Run(base::WrapUnique(new net::CertificateList));
}
}
« no previous file with comments | « chrome/browser/chromeos/platform_keys/platform_keys.h ('k') | chrome/browser/chromeos/platform_keys/platform_keys_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698