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

Unified Diff: chrome/browser/sync/profile_sync_service.cc

Issue 14888003: [Sync] Log age of auth tokens on authentication failure (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 7 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/signin_internals_util.cc ('k') | sync/engine/net/server_connection_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/profile_sync_service.cc
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 6bde4cca7f81b212fd414293d8584760798ffb47..8deed679e6fc8fffdcc9695da046c40dd4c478f1 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -28,6 +28,8 @@
#include "chrome/browser/net/chrome_cookie_notification_details.h"
#include "chrome/browser/prefs/pref_service_syncable.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/signin/about_signin_internals.h"
+#include "chrome/browser/signin/about_signin_internals_factory.h"
#include "chrome/browser/signin/signin_manager.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/signin/token_service.h"
@@ -422,8 +424,11 @@ SyncCredentials ProfileSyncService::GetCredentials() {
DCHECK(!credentials.email.empty());
TokenService* service = TokenServiceFactory::GetForProfile(profile_);
if (service->HasTokenForService(GaiaConstants::kSyncService)) {
- credentials.sync_token = service->GetTokenForService(
- GaiaConstants::kSyncService);
+ credentials.sync_token = service->GetTokenForService(
+ GaiaConstants::kSyncService);
+ credentials.sync_token_time =
+ AboutSigninInternalsFactory::GetForProfile(profile_)->
+ GetTokenTime(GaiaConstants::kSyncService);
UMA_HISTOGRAM_BOOLEAN("Sync.CredentialsLost", false);
} else {
// We've lost our sync credentials (crbug.com/121755), so just make up some
« no previous file with comments | « chrome/browser/signin/signin_internals_util.cc ('k') | sync/engine/net/server_connection_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698