| 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 "components/signin/core/browser/gaia_cookie_manager_service.h" | 5 #include "components/signin/core/browser/gaia_cookie_manager_service.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <queue> | 9 #include <queue> |
| 10 | 10 |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 [](const GaiaCookieRequest& request) { | 396 [](const GaiaCookieRequest& request) { |
| 397 return request.request_type() == LIST_ACCOUNTS; | 397 return request.request_type() == LIST_ACCOUNTS; |
| 398 }) == requests_.end()) { | 398 }) == requests_.end()) { |
| 399 requests_.push_back(GaiaCookieRequest::CreateListAccountsRequest(source)); | 399 requests_.push_back(GaiaCookieRequest::CreateListAccountsRequest(source)); |
| 400 } | 400 } |
| 401 } | 401 } |
| 402 | 402 |
| 403 void GaiaCookieManagerService::ForceOnCookieChangedProcessing() { | 403 void GaiaCookieManagerService::ForceOnCookieChangedProcessing() { |
| 404 GURL google_url = GaiaUrls::GetInstance()->google_url(); | 404 GURL google_url = GaiaUrls::GetInstance()->google_url(); |
| 405 std::unique_ptr<net::CanonicalCookie> cookie(net::CanonicalCookie::Create( | 405 std::unique_ptr<net::CanonicalCookie> cookie(net::CanonicalCookie::Create( |
| 406 google_url, kGaiaCookieName, std::string(), "." + google_url.host(), | 406 kGaiaCookieName, std::string(), "." + google_url.host(), std::string(), |
| 407 std::string(), base::Time(), base::Time(), false, false, | 407 base::Time(), base::Time(), base::Time(), false, false, |
| 408 net::CookieSameSite::DEFAULT_MODE, net::COOKIE_PRIORITY_DEFAULT)); | 408 net::CookieSameSite::DEFAULT_MODE, net::COOKIE_PRIORITY_DEFAULT)); |
| 409 OnCookieChanged(*cookie, net::CookieStore::ChangeCause::UNKNOWN_DELETION); | 409 OnCookieChanged(*cookie, net::CookieStore::ChangeCause::UNKNOWN_DELETION); |
| 410 } | 410 } |
| 411 | 411 |
| 412 void GaiaCookieManagerService::LogOutAllAccounts(const std::string& source) { | 412 void GaiaCookieManagerService::LogOutAllAccounts(const std::string& source) { |
| 413 VLOG(1) << "GaiaCookieManagerService::LogOutAllAccounts"; | 413 VLOG(1) << "GaiaCookieManagerService::LogOutAllAccounts"; |
| 414 | 414 |
| 415 bool log_out_queued = false; | 415 bool log_out_queued = false; |
| 416 if (!requests_.empty()) { | 416 if (!requests_.empty()) { |
| 417 // Track requests to keep; all other unstarted requests will be removed. | 417 // Track requests to keep; all other unstarted requests will be removed. |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 break; | 816 break; |
| 817 case GaiaCookieRequestType::LIST_ACCOUNTS: | 817 case GaiaCookieRequestType::LIST_ACCOUNTS: |
| 818 uber_token_fetcher_.reset(); | 818 uber_token_fetcher_.reset(); |
| 819 signin_client_->DelayNetworkCall( | 819 signin_client_->DelayNetworkCall( |
| 820 base::Bind(&GaiaCookieManagerService::StartFetchingListAccounts, | 820 base::Bind(&GaiaCookieManagerService::StartFetchingListAccounts, |
| 821 base::Unretained(this))); | 821 base::Unretained(this))); |
| 822 break; | 822 break; |
| 823 } | 823 } |
| 824 } | 824 } |
| 825 } | 825 } |
| OLD | NEW |