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

Unified Diff: components/proximity_auth/cryptauth/cryptauth_client_impl.cc

Issue 1912433002: Convert //components/proximity_auth from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits 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: components/proximity_auth/cryptauth/cryptauth_client_impl.cc
diff --git a/components/proximity_auth/cryptauth/cryptauth_client_impl.cc b/components/proximity_auth/cryptauth/cryptauth_client_impl.cc
index 9e924bbeb4566f71abe88ec1859034d805344a47..e1100624172e639cac3be1865eaa4fd2af65abec 100644
--- a/components/proximity_auth/cryptauth/cryptauth_client_impl.cc
+++ b/components/proximity_auth/cryptauth/cryptauth_client_impl.cc
@@ -8,6 +8,7 @@
#include "base/bind.h"
#include "base/command_line.h"
+#include "base/memory/ptr_util.h"
#include "components/proximity_auth/cryptauth/cryptauth_access_token_fetcher_impl.h"
#include "components/proximity_auth/cryptauth/switches.h"
@@ -48,8 +49,8 @@ GURL CreateRequestUrl(const std::string& request_path) {
} // namespace
CryptAuthClientImpl::CryptAuthClientImpl(
- scoped_ptr<CryptAuthApiCallFlow> api_call_flow,
- scoped_ptr<CryptAuthAccessTokenFetcher> access_token_fetcher,
+ std::unique_ptr<CryptAuthApiCallFlow> api_call_flow,
+ std::unique_ptr<CryptAuthAccessTokenFetcher> access_token_fetcher,
scoped_refptr<net::URLRequestContextGetter> url_request_context,
const cryptauth::DeviceClassifier& device_classifier)
: api_call_flow_(std::move(api_call_flow)),
@@ -191,10 +192,10 @@ CryptAuthClientFactoryImpl::CryptAuthClientFactoryImpl(
CryptAuthClientFactoryImpl::~CryptAuthClientFactoryImpl() {
}
-scoped_ptr<CryptAuthClient> CryptAuthClientFactoryImpl::CreateInstance() {
- return make_scoped_ptr(new CryptAuthClientImpl(
- make_scoped_ptr(new CryptAuthApiCallFlow()),
- make_scoped_ptr(
+std::unique_ptr<CryptAuthClient> CryptAuthClientFactoryImpl::CreateInstance() {
+ return base::WrapUnique(new CryptAuthClientImpl(
+ base::WrapUnique(new CryptAuthApiCallFlow()),
+ base::WrapUnique(
new CryptAuthAccessTokenFetcherImpl(token_service_, account_id_)),
url_request_context_, device_classifier_));
}

Powered by Google App Engine
This is Rietveld 408576698