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)); |
} |