| OLD | NEW |
| 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 #include "chrome/browser/chromeos/login/profile_auth_data.h" | 5 #include "chrome/browser/chromeos/login/profile_auth_data.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "content/public/browser/browser_thread.h" | 8 #include "content/public/browser/browser_thread.h" |
| 9 #include "net/base/server_bound_cert_service.h" | 9 #include "net/base/server_bound_cert_service.h" |
| 10 #include "net/base/server_bound_cert_store.h" | 10 #include "net/base/server_bound_cert_store.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 Finish(); | 151 Finish(); |
| 152 } | 152 } |
| 153 | 153 |
| 154 // Callback for receiving |cookies_to_transfer| from the authentication profile | 154 // Callback for receiving |cookies_to_transfer| from the authentication profile |
| 155 // cookie jar. | 155 // cookie jar. |
| 156 void ProfileAuthDataTransferer::OnGetCookiesToTransfer( | 156 void ProfileAuthDataTransferer::OnGetCookiesToTransfer( |
| 157 const net::CookieList& cookies_to_transfer) { | 157 const net::CookieList& cookies_to_transfer) { |
| 158 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 158 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 159 | 159 |
| 160 got_cookies_ = true; | 160 got_cookies_ = true; |
| 161 cookies_to_transfer_ = cookies_to_transfer; |
| 161 MaybeDoCookieAndCertTransfer(); | 162 MaybeDoCookieAndCertTransfer(); |
| 162 } | 163 } |
| 163 | 164 |
| 164 // Retrieves initial set of Profile cookies from the |from_context_|. | 165 // Retrieves initial set of Profile cookies from the |from_context_|. |
| 165 void ProfileAuthDataTransferer::RetrieveDefaultCookies() { | 166 void ProfileAuthDataTransferer::RetrieveDefaultCookies() { |
| 166 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 167 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 167 | 168 |
| 168 net::CookieStore* from_store = | 169 net::CookieStore* from_store = |
| 169 from_context_->GetURLRequestContext()->cookie_store(); | 170 from_context_->GetURLRequestContext()->cookie_store(); |
| 170 net::CookieMonster* from_monster = from_store->GetCookieMonster(); | 171 net::CookieMonster* from_monster = from_store->GetCookieMonster(); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 Profile* from_profile, | 214 Profile* from_profile, |
| 214 Profile* to_profile, | 215 Profile* to_profile, |
| 215 bool transfer_cookies, | 216 bool transfer_cookies, |
| 216 const base::Closure& completion_callback) { | 217 const base::Closure& completion_callback) { |
| 217 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 218 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 218 (new ProfileAuthDataTransferer(from_profile, to_profile, transfer_cookies, | 219 (new ProfileAuthDataTransferer(from_profile, to_profile, transfer_cookies, |
| 219 completion_callback))->BeginTransfer(); | 220 completion_callback))->BeginTransfer(); |
| 220 } | 221 } |
| 221 | 222 |
| 222 } // namespace chromeos | 223 } // namespace chromeos |
| OLD | NEW |