Chromium Code Reviews| Index: chrome/browser/signin/token_service.cc |
| diff --git a/chrome/browser/signin/token_service.cc b/chrome/browser/signin/token_service.cc |
| index da66af2c8dc4e1cbecb8600749a11b7cfdd373c8..d78e94f07d16924afb0fd6a68521e8151cce8168 100644 |
| --- a/chrome/browser/signin/token_service.cc |
| +++ b/chrome/browser/signin/token_service.cc |
| @@ -7,11 +7,13 @@ |
| #include "base/basictypes.h" |
| #include "base/command_line.h" |
| #include "base/string_util.h" |
| +#include "chrome/browser/prefs/pref_service.h" |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/common/chrome_notification_types.h" |
| #include "chrome/common/chrome_switches.h" |
| #include "chrome/common/net/gaia/gaia_auth_fetcher.h" |
| #include "chrome/common/net/gaia/gaia_constants.h" |
| +#include "chrome/common/pref_names.h" |
| #include "content/public/browser/browser_thread.h" |
| #include "content/public/browser/notification_service.h" |
| #include "content/public/browser/notification_source.h" |
| @@ -133,6 +135,13 @@ void TokenService::SaveAuthTokenToDB(const std::string& service, |
| void TokenService::EraseTokensFromDB() { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| + // Try to track down http://crbug.com/121755 - we should never clear the |
| + // token DB while we're still logged in. |
| + if (profile_) { |
| + std::string user = profile_->GetPrefs()->GetString( |
| + prefs::kGoogleServicesUsername); |
|
tim (not reviewing)
2012/04/25 18:37:59
Is there anything else in TokenService that expect
|
| + CHECK(user.empty()); |
| + } |
| if (web_data_service_.get()) |
| web_data_service_->RemoveAllTokens(); |
| } |