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

Unified Diff: chrome/browser/signin/profile_oauth2_token_service.cc

Issue 101633009: Move RevokeCredentialsOnServer to MutableProfileOAuth2TokenService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address code review. Created 7 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 | « chrome/browser/signin/profile_oauth2_token_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/profile_oauth2_token_service.cc
diff --git a/chrome/browser/signin/profile_oauth2_token_service.cc b/chrome/browser/signin/profile_oauth2_token_service.cc
index 91dc61fcfee69ba27c8b65b62fc7d1d0e33ee862..07c6de643b5c16bf595d7461556cee5b2e15823d 100644
--- a/chrome/browser/signin/profile_oauth2_token_service.cc
+++ b/chrome/browser/signin/profile_oauth2_token_service.cc
@@ -23,47 +23,6 @@
#include "google_apis/gaia/google_service_auth_error.h"
#include "net/url_request/url_request_context_getter.h"
-namespace {
-
-// This class sends a request to GAIA to revoke the given refresh token from
-// the server. This is a best effort attempt only. This class deletes itself
-// when done sucessfully or otherwise.
-class RevokeServerRefreshToken : public GaiaAuthConsumer {
- public:
- RevokeServerRefreshToken(const std::string& account_id,
- net::URLRequestContextGetter* request_context);
- virtual ~RevokeServerRefreshToken();
-
- private:
- // GaiaAuthConsumer overrides:
- virtual void OnOAuth2RevokeTokenCompleted() OVERRIDE;
-
- scoped_refptr<net::URLRequestContextGetter> request_context_;
- scoped_ptr<GaiaAuthFetcher> fetcher_;
-
- DISALLOW_COPY_AND_ASSIGN(RevokeServerRefreshToken);
-};
-
-RevokeServerRefreshToken::RevokeServerRefreshToken(
- const std::string& refresh_token,
- net::URLRequestContextGetter* request_context)
- : request_context_(request_context) {
- fetcher_.reset(
- new GaiaAuthFetcher(this,
- GaiaConstants::kChromeSource,
- request_context_.get()));
- fetcher_->StartRevokeOAuth2Token(refresh_token);
-}
-
-RevokeServerRefreshToken::~RevokeServerRefreshToken() {}
-
-void RevokeServerRefreshToken::OnOAuth2RevokeTokenCompleted() {
- delete this;
-}
-
-} // namespace
-
-
ProfileOAuth2TokenService::AccountInfo::AccountInfo(
ProfileOAuth2TokenService* token_service,
const std::string& account_id,
@@ -136,7 +95,7 @@ std::string ProfileOAuth2TokenService::GetRefreshToken(
}
net::URLRequestContextGetter* ProfileOAuth2TokenService::GetRequestContext() {
- return profile_->GetRequestContext();
+ return NULL;
}
void ProfileOAuth2TokenService::UpdateAuthError(
@@ -261,6 +220,5 @@ void ProfileOAuth2TokenService::LoadCredentials() {
void ProfileOAuth2TokenService::RevokeCredentialsOnServer(
const std::string& refresh_token) {
- // RevokeServerRefreshToken deletes itself when done.
- new RevokeServerRefreshToken(refresh_token, GetRequestContext());
+ // Empty implementation by default.
}
« no previous file with comments | « chrome/browser/signin/profile_oauth2_token_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698