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

Unified Diff: chrome/browser/chromeos/login/profile_auth_data.cc

Issue 538543003: Fix copying of SAML IdP cookies on subsequent logins (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update tests. Created 6 years, 3 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 | « no previous file | chrome/browser/chromeos/login/profile_auth_data_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/profile_auth_data.cc
diff --git a/chrome/browser/chromeos/login/profile_auth_data.cc b/chrome/browser/chromeos/login/profile_auth_data.cc
index 0dc0d72d250d01cfd28316997a526865167d2e04..d75c9d0aa6b9bb503b1db0088b6daae912a2e9eb 100644
--- a/chrome/browser/chromeos/login/profile_auth_data.cc
+++ b/chrome/browser/chromeos/login/profile_auth_data.cc
@@ -286,31 +286,19 @@ void ProfileAuthDataTransferer::MaybeTransferCookiesAndChannelIDs() {
to_context_->GetURLRequestContext()->cookie_store();
net::CookieMonster* to_monster = to_store->GetCookieMonster();
if (first_login_) {
- to_monster->InitializeFrom(cookies_to_transfer_);
+ to_monster->ImportCookies(cookies_to_transfer_);
net::ChannelIDService* to_cert_service =
to_context_->GetURLRequestContext()->channel_id_service();
to_cert_service->GetChannelIDStore()->InitializeFrom(
channel_ids_to_transfer_);
} else {
+ net::CookieList non_gaia_cookies;
for (net::CookieList::const_iterator it = cookies_to_transfer_.begin();
it != cookies_to_transfer_.end(); ++it) {
- if (IsGAIACookie(*it))
- continue;
- // Although this method can be asynchronous, it will run synchronously in
- // this case as the target cookie jar is guaranteed to be loaded and
- // ready.
- to_monster->SetCookieWithDetailsAsync(
- GURL(it->Source()),
- it->Name(),
- it->Value(),
- it->Domain(),
- it->Path(),
- it->ExpiryDate(),
- it->IsSecure(),
- it->IsHttpOnly(),
- it->Priority(),
- net::CookieStore::SetCookiesCallback());
+ if (!IsGAIACookie(*it))
+ non_gaia_cookies.push_back(*it);
}
+ to_monster->ImportCookies(non_gaia_cookies);
}
Finish();
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/profile_auth_data_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698