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

Unified Diff: google_apis/gaia/ubertoken_fetcher.cc

Issue 2757873002: Change SigninClient::CreateGaiaAuthFetcher return type to unique_ptr (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « google_apis/gaia/ubertoken_fetcher.h ('k') | ios/chrome/browser/signin/signin_client_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/ubertoken_fetcher.cc
diff --git a/google_apis/gaia/ubertoken_fetcher.cc b/google_apis/gaia/ubertoken_fetcher.cc
index 0e65e917d58fa56f2f129821a6101a06af7f15dd..eb13798cddc4450ad305dd1265961d449142c682 100644
--- a/google_apis/gaia/ubertoken_fetcher.cc
+++ b/google_apis/gaia/ubertoken_fetcher.cc
@@ -7,6 +7,7 @@
#include <vector>
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/rand_util.h"
#include "base/time/time.h"
@@ -16,11 +17,11 @@
#include "google_apis/gaia/oauth2_token_service.h"
namespace {
-GaiaAuthFetcher* CreateGaiaAuthFetcher(
+std::unique_ptr<GaiaAuthFetcher> CreateGaiaAuthFetcher(
GaiaAuthConsumer* consumer,
const std::string& source,
net::URLRequestContextGetter* request_context) {
- return new GaiaAuthFetcher(consumer, source, request_context);
+ return base::MakeUnique<GaiaAuthFetcher>(consumer, source, request_context);
}
}
@@ -149,7 +150,7 @@ void UbertokenFetcher::RequestAccessToken() {
}
void UbertokenFetcher::ExchangeTokens() {
- gaia_auth_fetcher_.reset(
- gaia_auth_fetcher_factory_.Run(this, source_, request_context_));
+ gaia_auth_fetcher_ =
+ gaia_auth_fetcher_factory_.Run(this, source_, request_context_);
gaia_auth_fetcher_->StartTokenFetchForUberAuthExchange(access_token_);
}
« no previous file with comments | « google_apis/gaia/ubertoken_fetcher.h ('k') | ios/chrome/browser/signin/signin_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698