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

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

Issue 16154031: Un-refcount AutofillWebData and TokenWebData (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on ToT Created 7 years, 6 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
Index: chrome/browser/signin/token_service.cc
diff --git a/chrome/browser/signin/token_service.cc b/chrome/browser/signin/token_service.cc
index 33ef34291822cddedf2c1996d97399234bcb1ce8..ef2886db24bb10f915cad27191a4bcdcbc758421 100644
--- a/chrome/browser/signin/token_service.cc
+++ b/chrome/browser/signin/token_service.cc
@@ -49,6 +49,7 @@ 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
@@ -175,20 +176,20 @@ void TokenService::UpdateCredentialsWithOAuth2(
void TokenService::LoadTokensFromDB() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- if (token_web_data_.get())
+ if (token_web_data_)
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_.get())
+ if (token_web_data_)
token_web_data_->SetTokenForService(service, auth_token);
}
void TokenService::EraseTokensFromDB() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- if (token_web_data_.get())
+ if (token_web_data_)
token_web_data_->RemoveAllTokens();
content::NotificationService::current()->Notify(

Powered by Google App Engine
This is Rietveld 408576698