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

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

Issue 7541021: Update asynchronous CookieMonster API to login_utils. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 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
« no previous file with comments | « no previous file | net/base/cookie_monster.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/login_utils.cc
===================================================================
--- chrome/browser/chromeos/login/login_utils.cc (revision 95818)
+++ chrome/browser/chromeos/login/login_utils.cc (working copy)
@@ -129,11 +129,19 @@
auth_context_->GetURLRequestContext()->cookie_store();
net::CookieMonster* default_monster = default_store->GetCookieMonster();
default_monster->SetKeepExpiredCookies();
+ default_monster->GetAllCookiesAsync(
+ base::Bind(
+ &TransferDefaultCookiesOnIOThreadTask::InitializeCookieMonster,
+ base::Unretained(this)));
+ }
+
+ void InitializeCookieMonster(const net::CookieList& cookies) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
net::CookieStore* new_store =
new_context_->GetURLRequestContext()->cookie_store();
net::CookieMonster* new_monster = new_store->GetCookieMonster();
- if (!new_monster->InitializeFrom(default_monster)) {
+ if (!new_monster->InitializeFrom(cookies)) {
LOG(WARNING) << "Failed initial cookie transfer.";
}
}
« no previous file with comments | « no previous file | net/base/cookie_monster.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698