diff options
author | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-08 12:33:46 +0000 |
---|---|---|
committer | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-08 12:33:46 +0000 |
commit | e4d0ed2731bd622c36ded53ae2c9957f6bfc4241 (patch) | |
tree | 8eb674b89678c38605c52f5e4ff6125100db8ab9 /chrome/browser/signin | |
parent | 99dbb184ea5182e07a738a9c901494ccb970d01f (diff) | |
download | chromium_src-e4d0ed2731bd622c36ded53ae2c9957f6bfc4241.zip chromium_src-e4d0ed2731bd622c36ded53ae2c9957f6bfc4241.tar.gz chromium_src-e4d0ed2731bd622c36ded53ae2c9957f6bfc4241.tar.bz2 |
Revert 205038 "Un-refcount AutofillWebData and TokenWebData"
Not sure if this is the culprit but lots of bots are red
unittest runs in linux mac and chromeos are not completing (timeout)
no output. Only for CL common to all, this is one.
I'll unrevert if it does not help.
> Un-refcount AutofillWebData and TokenWebData
>
> depends on https://codereview.chromium.org/15927029/
>
> BUG=230920
>
> Review URL: https://chromiumcodereview.appspot.com/16154031
TBR=caitkp@chromium.org
Review URL: https://codereview.chromium.org/15937020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205055 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/signin')
-rw-r--r-- | chrome/browser/signin/token_service.cc | 7 | ||||
-rw-r--r-- | chrome/browser/signin/token_service.h | 6 |
2 files changed, 5 insertions, 8 deletions
diff --git a/chrome/browser/signin/token_service.cc b/chrome/browser/signin/token_service.cc index ef2886d..33ef342 100644 --- a/chrome/browser/signin/token_service.cc +++ b/chrome/browser/signin/token_service.cc @@ -49,7 +49,6 @@ const char* kServices[] = { TokenService::TokenService() : profile_(NULL), - token_web_data_(NULL), token_loading_query_(0), tokens_loaded_(false) { // Allow constructor to be called outside the UI thread, so it can be mocked @@ -176,20 +175,20 @@ void TokenService::UpdateCredentialsWithOAuth2( void TokenService::LoadTokensFromDB() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - if (token_web_data_) + if (token_web_data_.get()) token_loading_query_ = token_web_data_->GetAllTokens(this); } void TokenService::SaveAuthTokenToDB(const std::string& service, const std::string& auth_token) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - if (token_web_data_) + if (token_web_data_.get()) token_web_data_->SetTokenForService(service, auth_token); } void TokenService::EraseTokensFromDB() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - if (token_web_data_) + if (token_web_data_.get()) token_web_data_->RemoveAllTokens(); content::NotificationService::current()->Notify( diff --git a/chrome/browser/signin/token_service.h b/chrome/browser/signin/token_service.h index ebe9595..5ab612cc 100644 --- a/chrome/browser/signin/token_service.h +++ b/chrome/browser/signin/token_service.h @@ -228,10 +228,8 @@ class TokenService : public GaiaAuthConsumer, // The profile with which this instance was initialized, or NULL. Profile* profile_; - // Web data service to access tokens from. Owned by WebDataServiceWrapper, - // which outlives TokenService. - TokenWebData* token_web_data_; - + // Web data service to access tokens from. + scoped_refptr<TokenWebData> token_web_data_; // Getter to use for fetchers. scoped_refptr<net::URLRequestContextGetter> getter_; // Request handle to load Gaia tokens from DB. |