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

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

Issue 129253003: Revert of Create signin component and componentize TokenWebData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | « chrome/browser/DEPS ('k') | chrome/browser/signin/mutable_profile_oauth2_token_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/mutable_profile_oauth2_token_service.cc
diff --git a/chrome/browser/signin/mutable_profile_oauth2_token_service.cc b/chrome/browser/signin/mutable_profile_oauth2_token_service.cc
index aa2ce05630fa5924ebdf3023f169b0798172c2f7..f940bcc6c52cca31781ed6271a621b353bfb052b 100644
--- a/chrome/browser/signin/mutable_profile_oauth2_token_service.cc
+++ b/chrome/browser/signin/mutable_profile_oauth2_token_service.cc
@@ -5,8 +5,7 @@
#include "chrome/browser/signin/mutable_profile_oauth2_token_service.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/webdata/web_data_service_factory.h"
-#include "components/signin/core/webdata/token_web_data.h"
+#include "chrome/browser/webdata/token_web_data.h"
#include "components/webdata/common/web_data_service_base.h"
#include "google_apis/gaia/gaia_auth_fetcher.h"
#include "google_apis/gaia/gaia_constants.h"
@@ -83,8 +82,7 @@
void MutableProfileOAuth2TokenService::Shutdown() {
if (web_data_service_request_ != 0) {
scoped_refptr<TokenWebData> token_web_data =
- WebDataServiceFactory::GetTokenWebDataForProfile(
- profile(), Profile::EXPLICIT_ACCESS);
+ TokenWebData::FromBrowserContext(profile());
DCHECK(token_web_data.get());
token_web_data->CancelRequest(web_data_service_request_);
web_data_service_request_ = 0;
@@ -103,8 +101,7 @@
CancelAllRequests();
refresh_tokens().clear();
scoped_refptr<TokenWebData> token_web_data =
- WebDataServiceFactory::GetTokenWebDataForProfile(
- profile(), Profile::EXPLICIT_ACCESS);
+ TokenWebData::FromBrowserContext(profile());
if (token_web_data.get())
web_data_service_request_ = token_web_data->GetAllTokens(this);
}
@@ -159,8 +156,7 @@
if (IsLegacyServiceId(prefixed_account_id)) {
scoped_refptr<TokenWebData> token_web_data =
- WebDataServiceFactory::GetTokenWebDataForProfile(
- profile(), Profile::EXPLICIT_ACCESS);
+ TokenWebData::FromBrowserContext(profile());
if (token_web_data.get())
token_web_data->RemoveTokenForService(prefixed_account_id);
} else {
@@ -187,8 +183,7 @@
const std::string& account_id,
const std::string& refresh_token) {
scoped_refptr<TokenWebData> token_web_data =
- WebDataServiceFactory::GetTokenWebDataForProfile(
- profile(), Profile::EXPLICIT_ACCESS);
+ TokenWebData::FromBrowserContext(profile());
if (token_web_data.get()) {
token_web_data->SetTokenForService(ApplyAccountIdPrefix(account_id),
refresh_token);
@@ -198,8 +193,7 @@
void MutableProfileOAuth2TokenService::ClearPersistedCredentials(
const std::string& account_id) {
scoped_refptr<TokenWebData> token_web_data =
- WebDataServiceFactory::GetTokenWebDataForProfile(
- profile(), Profile::EXPLICIT_ACCESS);
+ TokenWebData::FromBrowserContext(profile());
if (token_web_data.get())
token_web_data->RemoveTokenForService(ApplyAccountIdPrefix(account_id));
}
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/signin/mutable_profile_oauth2_token_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698