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

Side by Side Diff: components/signin/core/browser/gaia_cookie_manager_service.cc

Issue 2394203002: Fix GCMS::ListAccounts returning stale data on iOS. (Closed)
Patch Set: Created 4 years, 2 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/signin/core/browser/gaia_cookie_manager_service.h" 5 #include "components/signin/core/browser/gaia_cookie_manager_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <queue> 9 #include <queue>
10 10
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 const std::string account_id = requests_.front().account_id(); 552 const std::string account_id = requests_.front().account_id();
553 HandleNextRequest(); 553 HandleNextRequest();
554 SignalComplete(account_id, error); 554 SignalComplete(account_id, error);
555 } 555 }
556 556
557 void GaiaCookieManagerService::OnMergeSessionSuccess(const std::string& data) { 557 void GaiaCookieManagerService::OnMergeSessionSuccess(const std::string& data) {
558 VLOG(1) << "MergeSession successful account=" 558 VLOG(1) << "MergeSession successful account="
559 << requests_.front().account_id(); 559 << requests_.front().account_id();
560 DCHECK(requests_.front().request_type() == 560 DCHECK(requests_.front().request_type() ==
561 GaiaCookieRequestType::ADD_ACCOUNT); 561 GaiaCookieRequestType::ADD_ACCOUNT);
562
563 list_accounts_stale_ = true;
564
562 const std::string account_id = requests_.front().account_id(); 565 const std::string account_id = requests_.front().account_id();
563 HandleNextRequest(); 566 HandleNextRequest();
564 SignalComplete(account_id, GoogleServiceAuthError::AuthErrorNone()); 567 SignalComplete(account_id, GoogleServiceAuthError::AuthErrorNone());
565 568
566 fetcher_backoff_.InformOfRequest(true); 569 fetcher_backoff_.InformOfRequest(true);
567 uber_token_ = std::string(); 570 uber_token_ = std::string();
568 } 571 }
569 572
570 void GaiaCookieManagerService::OnMergeSessionFailure( 573 void GaiaCookieManagerService::OnMergeSessionFailure(
571 const GoogleServiceAuthError& error) { 574 const GoogleServiceAuthError& error) {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 FOR_EACH_OBSERVER(Observer, observer_list_, 658 FOR_EACH_OBSERVER(Observer, observer_list_,
656 OnGaiaAccountsInCookieUpdated( 659 OnGaiaAccountsInCookieUpdated(
657 listed_accounts_, signed_out_accounts_, error)); 660 listed_accounts_, signed_out_accounts_, error));
658 HandleNextRequest(); 661 HandleNextRequest();
659 } 662 }
660 663
661 void GaiaCookieManagerService::OnLogOutSuccess() { 664 void GaiaCookieManagerService::OnLogOutSuccess() {
662 DCHECK(requests_.front().request_type() == GaiaCookieRequestType::LOG_OUT); 665 DCHECK(requests_.front().request_type() == GaiaCookieRequestType::LOG_OUT);
663 VLOG(1) << "GaiaCookieManagerService::OnLogOutSuccess"; 666 VLOG(1) << "GaiaCookieManagerService::OnLogOutSuccess";
664 667
668 list_accounts_stale_ = true;
669
665 fetcher_backoff_.InformOfRequest(true); 670 fetcher_backoff_.InformOfRequest(true);
666 HandleNextRequest(); 671 HandleNextRequest();
667 } 672 }
668 673
669 void GaiaCookieManagerService::OnLogOutFailure( 674 void GaiaCookieManagerService::OnLogOutFailure(
670 const GoogleServiceAuthError& error) { 675 const GoogleServiceAuthError& error) {
671 DCHECK(requests_.front().request_type() == GaiaCookieRequestType::LOG_OUT); 676 DCHECK(requests_.front().request_type() == GaiaCookieRequestType::LOG_OUT);
672 VLOG(1) << "GaiaCookieManagerService::OnLogOutFailure"; 677 VLOG(1) << "GaiaCookieManagerService::OnLogOutFailure";
673 678
674 if (++fetcher_retries_ < kMaxFetcherRetries) { 679 if (++fetcher_retries_ < kMaxFetcherRetries) {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 break; 766 break;
762 case GaiaCookieRequestType::LIST_ACCOUNTS: 767 case GaiaCookieRequestType::LIST_ACCOUNTS:
763 uber_token_fetcher_.reset(); 768 uber_token_fetcher_.reset();
764 signin_client_->DelayNetworkCall( 769 signin_client_->DelayNetworkCall(
765 base::Bind(&GaiaCookieManagerService::StartFetchingListAccounts, 770 base::Bind(&GaiaCookieManagerService::StartFetchingListAccounts,
766 base::Unretained(this))); 771 base::Unretained(this)));
767 break; 772 break;
768 } 773 }
769 } 774 }
770 } 775 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698