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

Unified Diff: google_apis/gaia/gaia_oauth_client.cc

Issue 1547233002: Convert Pass()→std::move() in //google_apis (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/fake_gaia.cc ('k') | google_apis/gaia/oauth2_token_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/gaia_oauth_client.cc
diff --git a/google_apis/gaia/gaia_oauth_client.cc b/google_apis/gaia/gaia_oauth_client.cc
index c021623b5897ec85737e55bba717e768e2aebe6c..618ecd4052d04ff59f7064bf090b2bca0763a19b 100644
--- a/google_apis/gaia/gaia_oauth_client.cc
+++ b/google_apis/gaia/gaia_oauth_client.cc
@@ -4,6 +4,8 @@
#include "google_apis/gaia/gaia_oauth_client.h"
+#include <utility>
+
#include "base/json/json_reader.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
@@ -250,7 +252,7 @@ void GaiaOAuthClient::Core::HandleResponse(
// Move ownership of the request fetcher into a local scoped_ptr which
// will be nuked when we're done handling the request, unless we need
// to retry, in which case ownership will be returned to request_.
- scoped_ptr<net::URLFetcher> old_request = request_.Pass();
+ scoped_ptr<net::URLFetcher> old_request = std::move(request_);
DCHECK_EQ(source, old_request.get());
// HTTP_BAD_REQUEST means the arguments are invalid. HTTP_UNAUTHORIZED means
@@ -283,7 +285,7 @@ void GaiaOAuthClient::Core::HandleResponse(
// Retry limit reached. Give up.
delegate_->OnNetworkError(source->GetResponseCode());
} else {
- request_ = old_request.Pass();
+ request_ = std::move(old_request);
*should_retry_request = true;
}
return;
@@ -308,12 +310,12 @@ void GaiaOAuthClient::Core::HandleResponse(
}
case USER_INFO: {
- delegate_->OnGetUserInfoResponse(response_dict.Pass());
+ delegate_->OnGetUserInfoResponse(std::move(response_dict));
break;
}
case TOKEN_INFO: {
- delegate_->OnGetTokenInfoResponse(response_dict.Pass());
+ delegate_->OnGetTokenInfoResponse(std::move(response_dict));
break;
}
« no previous file with comments | « google_apis/gaia/fake_gaia.cc ('k') | google_apis/gaia/oauth2_token_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698