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

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

Issue 424233002: When the user signs in, make sure to set cookies on all reachable google (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 4 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/account_reconcilor.cc
diff --git a/components/signin/core/browser/account_reconcilor.cc b/components/signin/core/browser/account_reconcilor.cc
index 2da2267eb6810f0f3fdde3966e62782da0034dca..8b2932a24bf890b848c2d973aae9ca1f17426501 100644
--- a/components/signin/core/browser/account_reconcilor.cc
+++ b/components/signin/core/browser/account_reconcilor.cc
@@ -431,6 +431,8 @@ void AccountReconcilor::StartReconcile() {
is_reconcile_started_ = true;
+ StartFetchingExternalCcResult();
+
// Reset state for validating gaia cookie.
are_gaia_accounts_set_ = false;
gaia_accounts_.clear();
@@ -460,6 +462,10 @@ void AccountReconcilor::GetAccountsFromCookie(
}
}
+void AccountReconcilor::StartFetchingExternalCcResult() {
+ merge_session_helper_.StartFetchingExternalCcResult();
+}
+
void AccountReconcilor::OnListAccountsSuccess(const std::string& data) {
gaia_fetcher_.reset();
@@ -650,6 +656,8 @@ void AccountReconcilor::FinishReconcile() {
// SignalComplete() will change the array.
std::vector<std::string> add_to_cookie_copy = add_to_cookie_;
int added_to_cookie = 0;
+ bool external_cc_result_completed =
+ !merge_session_helper_.StillFetchingExternalCcResult();
for (size_t i = 0; i < add_to_cookie_copy.size(); ++i) {
if (gaia_accounts_.end() !=
std::find_if(gaia_accounts_.begin(),
@@ -666,6 +674,11 @@ void AccountReconcilor::FinishReconcile() {
}
}
+ // Log whether the external connection checks were completed when we tried
+ // to add the accounts to the cookie.
+ if (added_to_cookie > 0)
+ signin_metrics::LogExternalCcResultFetches(external_cc_result_completed);
+
std::string signin_scoped_device_id = client_->GetSigninScopedDeviceId();
// For each account in the gaia cookie not known to chrome,
// PerformAddToChromeAction. Make a copy of |add_to_chrome| since calls to
« no previous file with comments | « components/signin/core/browser/account_reconcilor.h ('k') | components/signin/core/browser/signin_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698