OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 std::string()); | 216 std::string()); |
217 | 217 |
218 net::CookieMonster* cookies = GetCookies(browser_context); | 218 net::CookieMonster* cookies = GetCookies(browser_context); |
219 // Ensure |cookies| is fully initialized. | 219 // Ensure |cookies| is fully initialized. |
220 run_loop_.reset(new base::RunLoop); | 220 run_loop_.reset(new base::RunLoop); |
221 cookies->GetAllCookiesAsync(base::Bind(&ProfileAuthDataTest::QuitLoop, | 221 cookies->GetAllCookiesAsync(base::Bind(&ProfileAuthDataTest::QuitLoop, |
222 base::Unretained(this))); | 222 base::Unretained(this))); |
223 run_loop_->Run(); | 223 run_loop_->Run(); |
224 | 224 |
225 net::CookieList cookie_list; | 225 net::CookieList cookie_list; |
226 cookie_list.push_back(net::CanonicalCookie(GURL(kGAIACookieURL), | 226 cookie_list.push_back(net::CanonicalCookie( |
227 kCookieName, | 227 GURL(kGAIACookieURL), kCookieName, cookie_value, kGAIACookieDomain, |
228 cookie_value, | 228 std::string(), base::Time(), base::Time(), base::Time(), true, false, |
229 kGAIACookieDomain, | 229 false, net::COOKIE_PRIORITY_DEFAULT)); |
230 std::string(), | 230 cookie_list.push_back(net::CanonicalCookie( |
231 base::Time(), | 231 GURL(kSAMLIdPCookieURL), kCookieName, cookie_value, kSAMLIdPCookieDomain, |
232 base::Time(), | 232 std::string(), base::Time(), base::Time(), base::Time(), true, false, |
233 base::Time(), | 233 false, net::COOKIE_PRIORITY_DEFAULT)); |
234 true, | |
235 false, | |
236 net::COOKIE_PRIORITY_DEFAULT)); | |
237 cookie_list.push_back(net::CanonicalCookie(GURL(kSAMLIdPCookieURL), | |
238 kCookieName, | |
239 cookie_value, | |
240 kSAMLIdPCookieDomain, | |
241 std::string(), | |
242 base::Time(), | |
243 base::Time(), | |
244 base::Time(), | |
245 true, | |
246 false, | |
247 net::COOKIE_PRIORITY_DEFAULT)); | |
248 cookies->ImportCookies(cookie_list); | 234 cookies->ImportCookies(cookie_list); |
249 | 235 |
250 GetChannelIDs(browser_context)->SetChannelID(kChannelIDServerIdentifier, | 236 GetChannelIDs(browser_context)->SetChannelID(kChannelIDServerIdentifier, |
251 base::Time(), | 237 base::Time(), |
252 base::Time(), | 238 base::Time(), |
253 channel_id_private_key, | 239 channel_id_private_key, |
254 channel_id_cert); | 240 channel_id_cert); |
255 } | 241 } |
256 | 242 |
257 net::URLRequestContext* ProfileAuthDataTest::GetRequestContext( | 243 net::URLRequestContext* ProfileAuthDataTest::GetRequestContext( |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 PopulateUserBrowserContext(); | 319 PopulateUserBrowserContext(); |
334 | 320 |
335 Transfer(false, true); | 321 Transfer(false, true); |
336 | 322 |
337 VerifyTransferredUserProxyAuthEntry(); | 323 VerifyTransferredUserProxyAuthEntry(); |
338 VerifyUserCookies(kCookieValue2, kCookieValue1); | 324 VerifyUserCookies(kCookieValue2, kCookieValue1); |
339 VerifyUserChannelID(kChannelIDPrivateKey2, kChannelIDCert2); | 325 VerifyUserChannelID(kChannelIDPrivateKey2, kChannelIDCert2); |
340 } | 326 } |
341 | 327 |
342 } // namespace chromeos | 328 } // namespace chromeos |
OLD | NEW |