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 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 net::CookieStore* cookies = GetCookies(browser_context); | 214 net::CookieStore* cookies = GetCookies(browser_context); |
215 // Ensure |cookies| is fully initialized. | 215 // Ensure |cookies| is fully initialized. |
216 run_loop_.reset(new base::RunLoop); | 216 run_loop_.reset(new base::RunLoop); |
217 cookies->GetAllCookiesAsync(base::Bind(&ProfileAuthDataTest::QuitLoop, | 217 cookies->GetAllCookiesAsync(base::Bind(&ProfileAuthDataTest::QuitLoop, |
218 base::Unretained(this))); | 218 base::Unretained(this))); |
219 run_loop_->Run(); | 219 run_loop_->Run(); |
220 | 220 |
221 cookies->SetCookieWithDetailsAsync( | 221 cookies->SetCookieWithDetailsAsync( |
222 GURL(kSAMLIdPCookieURL), kCookieName, cookie_value, std::string(), | 222 GURL(kSAMLIdPCookieURL), kCookieName, cookie_value, std::string(), |
223 std::string(), base::Time(), base::Time(), base::Time(), true, false, | 223 std::string(), base::Time(), base::Time(), base::Time(), true, false, |
224 false, false, net::COOKIE_PRIORITY_DEFAULT, | 224 net::CookieSameSite::DEFAULT_MODE, false, net::COOKIE_PRIORITY_DEFAULT, |
225 net::CookieStore::SetCookiesCallback()); | 225 net::CookieStore::SetCookiesCallback()); |
226 cookies->SetCookieWithDetailsAsync( | 226 cookies->SetCookieWithDetailsAsync( |
227 GURL(kGAIACookieURL), kCookieName, cookie_value, std::string(), | 227 GURL(kGAIACookieURL), kCookieName, cookie_value, std::string(), |
228 std::string(), base::Time(), base::Time(), base::Time(), true, false, | 228 std::string(), base::Time(), base::Time(), base::Time(), true, false, |
229 false, false, net::COOKIE_PRIORITY_DEFAULT, | 229 net::CookieSameSite::DEFAULT_MODE, false, net::COOKIE_PRIORITY_DEFAULT, |
230 net::CookieStore::SetCookiesCallback()); | 230 net::CookieStore::SetCookiesCallback()); |
231 | 231 |
232 GetChannelIDs(browser_context) | 232 GetChannelIDs(browser_context) |
233 ->SetChannelID(make_scoped_ptr(new net::ChannelIDStore::ChannelID( | 233 ->SetChannelID(make_scoped_ptr(new net::ChannelIDStore::ChannelID( |
234 kChannelIDServerIdentifier, base::Time(), | 234 kChannelIDServerIdentifier, base::Time(), |
235 std::move(channel_id_key)))); | 235 std::move(channel_id_key)))); |
236 } | 236 } |
237 | 237 |
238 net::URLRequestContext* ProfileAuthDataTest::GetRequestContext( | 238 net::URLRequestContext* ProfileAuthDataTest::GetRequestContext( |
239 content::BrowserContext* browser_context) { | 239 content::BrowserContext* browser_context) { |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 PopulateUserBrowserContext(); | 314 PopulateUserBrowserContext(); |
315 | 315 |
316 Transfer(false, true); | 316 Transfer(false, true); |
317 | 317 |
318 VerifyTransferredUserProxyAuthEntry(); | 318 VerifyTransferredUserProxyAuthEntry(); |
319 VerifyUserCookies(kCookieValue2, kCookieValue1); | 319 VerifyUserCookies(kCookieValue2, kCookieValue1); |
320 VerifyUserChannelID(channel_id_key2_.get()); | 320 VerifyUserChannelID(channel_id_key2_.get()); |
321 } | 321 } |
322 | 322 |
323 } // namespace chromeos | 323 } // namespace chromeos |
OLD | NEW |