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

Side by Side Diff: chrome/browser/signin/mutable_profile_oauth2_token_service_delegate.cc

Issue 2672603003: Avoid loading an empty token when decrypt failed (Closed)
Patch Set: Fix histogram names Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/signin/core/browser/webdata/token_service_table.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/signin/mutable_profile_oauth2_token_service_delegate.h" 5 #include "chrome/browser/signin/mutable_profile_oauth2_token_service_delegate.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/profiler/scoped_tracker.h" 10 #include "base/profiler/scoped_tracker.h"
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 if (db_tokens.count(ApplyAccountIdPrefix(canon_account_id)) == 0) 376 if (db_tokens.count(ApplyAccountIdPrefix(canon_account_id)) == 0)
377 PersistCredentials(canon_account_id, refresh_token); 377 PersistCredentials(canon_account_id, refresh_token);
378 } 378 }
379 379
380 account_id = canon_account_id; 380 account_id = canon_account_id;
381 } 381 }
382 382
383 // Only load secondary accounts when account consistency is enabled. 383 // Only load secondary accounts when account consistency is enabled.
384 if (switches::IsEnableAccountConsistency() || 384 if (switches::IsEnableAccountConsistency() ||
385 account_id == loading_primary_account_id_) { 385 account_id == loading_primary_account_id_) {
386 refresh_tokens_[account_id].reset(new AccountStatus( 386 refresh_tokens_[account_id].reset(new AccountStatus(
387 signin_error_controller_, account_id, refresh_token)); 387 signin_error_controller_, account_id, refresh_token));
388 FireRefreshTokenAvailable(account_id); 388 FireRefreshTokenAvailable(account_id);
389 } else { 389 } else {
390 RevokeCredentialsOnServer(refresh_token); 390 RevokeCredentialsOnServer(refresh_token);
391 ClearPersistedCredentials(account_id); 391 ClearPersistedCredentials(account_id);
392 FireRefreshTokenRevoked(account_id); 392 FireRefreshTokenRevoked(account_id);
393 } 393 }
394 } 394 }
395 } 395 }
396 396
397 if (!old_login_token.empty()) { 397 if (!old_login_token.empty()) {
398 DCHECK(!loading_primary_account_id_.empty()); 398 DCHECK(!loading_primary_account_id_.empty());
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 net::NetworkChangeNotifier::ConnectionType type) { 525 net::NetworkChangeNotifier::ConnectionType type) {
526 // If our network has changed, reset the backoff timer so that errors caused 526 // If our network has changed, reset the backoff timer so that errors caused
527 // by a previous lack of network connectivity don't prevent new requests. 527 // by a previous lack of network connectivity don't prevent new requests.
528 backoff_entry_.Reset(); 528 backoff_entry_.Reset();
529 } 529 }
530 530
531 const net::BackoffEntry* 531 const net::BackoffEntry*
532 MutableProfileOAuth2TokenServiceDelegate::BackoffEntry() const { 532 MutableProfileOAuth2TokenServiceDelegate::BackoffEntry() const {
533 return &backoff_entry_; 533 return &backoff_entry_;
534 } 534 }
OLDNEW
« no previous file with comments | « no previous file | components/signin/core/browser/webdata/token_service_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698