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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 }) == requests_.end()) { | 390 }) == requests_.end()) { |
391 requests_.push_back(GaiaCookieRequest::CreateListAccountsRequest(source)); | 391 requests_.push_back(GaiaCookieRequest::CreateListAccountsRequest(source)); |
392 } | 392 } |
393 } | 393 } |
394 | 394 |
395 void GaiaCookieManagerService::ForceOnCookieChangedProcessing() { | 395 void GaiaCookieManagerService::ForceOnCookieChangedProcessing() { |
396 GURL google_url = GaiaUrls::GetInstance()->google_url(); | 396 GURL google_url = GaiaUrls::GetInstance()->google_url(); |
397 std::unique_ptr<net::CanonicalCookie> cookie(net::CanonicalCookie::Create( | 397 std::unique_ptr<net::CanonicalCookie> cookie(net::CanonicalCookie::Create( |
398 google_url, kGaiaCookieName, std::string(), "." + google_url.host(), | 398 google_url, kGaiaCookieName, std::string(), "." + google_url.host(), |
399 std::string(), base::Time(), base::Time(), false, false, | 399 std::string(), base::Time(), base::Time(), false, false, |
400 net::CookieSameSite::DEFAULT_MODE, false, net::COOKIE_PRIORITY_DEFAULT)); | 400 net::CookieSameSite::DEFAULT_MODE, net::COOKIE_PRIORITY_DEFAULT)); |
401 OnCookieChanged(*cookie, net::CookieStore::ChangeCause::UNKNOWN_DELETION); | 401 OnCookieChanged(*cookie, net::CookieStore::ChangeCause::UNKNOWN_DELETION); |
402 } | 402 } |
403 | 403 |
404 void GaiaCookieManagerService::LogOutAllAccounts(const std::string& source) { | 404 void GaiaCookieManagerService::LogOutAllAccounts(const std::string& source) { |
405 VLOG(1) << "GaiaCookieManagerService::LogOutAllAccounts"; | 405 VLOG(1) << "GaiaCookieManagerService::LogOutAllAccounts"; |
406 | 406 |
407 bool log_out_queued = false; | 407 bool log_out_queued = false; |
408 if (!requests_.empty()) { | 408 if (!requests_.empty()) { |
409 // Track requests to keep; all other unstarted requests will be removed. | 409 // Track requests to keep; all other unstarted requests will be removed. |
410 std::vector<GaiaCookieRequest> requests_to_keep; | 410 std::vector<GaiaCookieRequest> requests_to_keep; |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 break; | 794 break; |
795 case GaiaCookieRequestType::LIST_ACCOUNTS: | 795 case GaiaCookieRequestType::LIST_ACCOUNTS: |
796 uber_token_fetcher_.reset(); | 796 uber_token_fetcher_.reset(); |
797 signin_client_->DelayNetworkCall( | 797 signin_client_->DelayNetworkCall( |
798 base::Bind(&GaiaCookieManagerService::StartFetchingListAccounts, | 798 base::Bind(&GaiaCookieManagerService::StartFetchingListAccounts, |
799 base::Unretained(this))); | 799 base::Unretained(this))); |
800 break; | 800 break; |
801 } | 801 } |
802 } | 802 } |
803 } | 803 } |
OLD | NEW |