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

Unified Diff: components/signin/core/browser/fake_profile_oauth2_token_service.cc

Issue 2685123002: Make OAuth2TokenService and subclasses take delegate by unique_ptr (Closed)
Patch Set: Created 3 years, 10 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/signin/core/browser/fake_profile_oauth2_token_service.cc
diff --git a/components/signin/core/browser/fake_profile_oauth2_token_service.cc b/components/signin/core/browser/fake_profile_oauth2_token_service.cc
index 876e8063f5c1246978a61fdbafec4a413a5b53d2..c15a1c3510a6d4f29b40dffcebb17c8b8be00ec1 100644
--- a/components/signin/core/browser/fake_profile_oauth2_token_service.cc
+++ b/components/signin/core/browser/fake_profile_oauth2_token_service.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/location.h"
+#include "base/memory/ptr_util.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
#include "google_apis/gaia/fake_oauth2_token_service_delegate.h"
@@ -19,11 +20,11 @@ FakeProfileOAuth2TokenService::PendingRequest::~PendingRequest() {}
FakeProfileOAuth2TokenService::FakeProfileOAuth2TokenService()
: FakeProfileOAuth2TokenService(
- new FakeOAuth2TokenServiceDelegate(nullptr)) {}
+ base::MakeUnique<FakeOAuth2TokenServiceDelegate>(nullptr)) {}
FakeProfileOAuth2TokenService::FakeProfileOAuth2TokenService(
- OAuth2TokenServiceDelegate* delegate)
- : ProfileOAuth2TokenService(delegate),
+ std::unique_ptr<OAuth2TokenServiceDelegate> delegate)
+ : ProfileOAuth2TokenService(std::move(delegate)),
auto_post_fetch_response_on_message_loop_(false),
weak_ptr_factory_(this) {}

Powered by Google App Engine
This is Rietveld 408576698