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

Unified Diff: components/signin/core/browser/gaia_cookie_manager_service.cc

Issue 1162103003: ListAccounts will return the Gaia ID as well as the email of the account. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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
Index: components/signin/core/browser/gaia_cookie_manager_service.cc
diff --git a/components/signin/core/browser/gaia_cookie_manager_service.cc b/components/signin/core/browser/gaia_cookie_manager_service.cc
index 0926687da4838a9f494fbb3bfde11bd438dbbd99..6da9051724a0b17b0d14c041e8451357534987e5 100644
--- a/components/signin/core/browser/gaia_cookie_manager_service.cc
+++ b/components/signin/core/browser/gaia_cookie_manager_service.cc
@@ -14,9 +14,9 @@
#include "base/strings/stringprintf.h"
#include "base/time/time.h"
#include "base/values.h"
+#include "components/signin/core/browser/account_tracker_service.h"
#include "components/signin/core/browser/signin_metrics.h"
#include "google_apis/gaia/gaia_auth_fetcher.h"
-#include "google_apis/gaia/gaia_auth_util.h"
#include "google_apis/gaia/gaia_constants.h"
#include "google_apis/gaia/gaia_urls.h"
#include "google_apis/gaia/oauth2_token_service.h"
@@ -338,7 +338,7 @@ void GaiaCookieManagerService::AddAccountToCookieWithToken(
}
bool GaiaCookieManagerService::ListAccounts(
- std::vector<std::pair<std::string,bool> >* accounts) {
+ std::vector<gaia::ListedAccount>* accounts) {
DCHECK(accounts);
accounts->clear();
@@ -560,6 +560,11 @@ void GaiaCookieManagerService::OnListAccountsSuccess(const std::string& data) {
return;
}
+ for (gaia::ListedAccount account : listed_accounts_) {
+ account.id = AccountTrackerService::PickAccountIdForAccount(
+ signin_client_->GetPrefs(), account.gaia_id, account.email);
+ }
+
list_accounts_fetched_once_ = true;
HandleNextRequest();
// HandleNextRequest before sending out the notification because some

Powered by Google App Engine
This is Rietveld 408576698