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

Side by Side Diff: net/cookies/cookie_monster.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 unified diff | Download patch
« no previous file with comments | « net/cookies/cookie_monster.h ('k') | net/cookies/cookie_monster_unittest.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Portions of this code based on Mozilla: 5 // Portions of this code based on Mozilla:
6 // (netwerk/cookie/src/nsCookieService.cpp) 6 // (netwerk/cookie/src/nsCookieService.cpp)
7 /* ***** BEGIN LICENSE BLOCK ***** 7 /* ***** BEGIN LICENSE BLOCK *****
8 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 8 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
9 * 9 *
10 * The contents of this file are subject to the Mozilla Public License Version 10 * The contents of this file are subject to the Mozilla Public License Version
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 secure, http_only, priority)); 1094 secure, http_only, priority));
1095 1095
1096 if (!cc.get()) 1096 if (!cc.get())
1097 return false; 1097 return false;
1098 1098
1099 CookieOptions options; 1099 CookieOptions options;
1100 options.set_include_httponly(); 1100 options.set_include_httponly();
1101 return SetCanonicalCookie(&cc, creation_time, options); 1101 return SetCanonicalCookie(&cc, creation_time, options);
1102 } 1102 }
1103 1103
1104 bool CookieMonster::InitializeFrom(const CookieList& list) { 1104 bool CookieMonster::ImportCookies(const CookieList& list) {
1105 base::AutoLock autolock(lock_); 1105 base::AutoLock autolock(lock_);
1106 InitIfNecessary(); 1106 InitIfNecessary();
1107 for (net::CookieList::const_iterator iter = list.begin(); 1107 for (net::CookieList::const_iterator iter = list.begin();
1108 iter != list.end(); ++iter) { 1108 iter != list.end(); ++iter) {
1109 scoped_ptr<CanonicalCookie> cookie(new CanonicalCookie(*iter)); 1109 scoped_ptr<CanonicalCookie> cookie(new CanonicalCookie(*iter));
1110 net::CookieOptions options; 1110 net::CookieOptions options;
1111 options.set_include_httponly(); 1111 options.set_include_httponly();
1112 if (!SetCanonicalCookie(&cookie, cookie->CreationDate(), options)) 1112 if (!SetCanonicalCookie(&cookie, cookie->CreationDate(), options))
1113 return false; 1113 return false;
1114 } 1114 }
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after
2297 2297
2298 return true; 2298 return true;
2299 } 2299 }
2300 2300
2301 bool CookieMonster::loaded() { 2301 bool CookieMonster::loaded() {
2302 base::AutoLock autolock(lock_); 2302 base::AutoLock autolock(lock_);
2303 return loaded_; 2303 return loaded_;
2304 } 2304 }
2305 2305
2306 } // namespace net 2306 } // namespace net
OLDNEW
« no previous file with comments | « net/cookies/cookie_monster.h ('k') | net/cookies/cookie_monster_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698