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

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
« no previous file with comments | « chrome/browser/signin/token_service.h ('k') | chrome/browser/sync/glue/autofill_data_type_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/token_service.cc
diff --git a/chrome/browser/signin/token_service.cc b/chrome/browser/signin/token_service.cc
index 2237adaf3e63a19304981a2c608ba1e2fcf77ea8..51eee1e94c315148035eb3823203933f90b805cd 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(
« no previous file with comments | « chrome/browser/signin/token_service.h ('k') | chrome/browser/sync/glue/autofill_data_type_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698