Chromium Code Reviews| 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 #include <vector> | 10 #include <vector> |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 371 } else if (std::find_if(requests_.begin(), requests_.end(), | 371 } else if (std::find_if(requests_.begin(), requests_.end(), |
| 372 [](const GaiaCookieRequest& request) { | 372 [](const GaiaCookieRequest& request) { |
| 373 return request.request_type() == LIST_ACCOUNTS; | 373 return request.request_type() == LIST_ACCOUNTS; |
| 374 }) == requests_.end()) { | 374 }) == requests_.end()) { |
| 375 requests_.push_back(GaiaCookieRequest::CreateListAccountsRequest()); | 375 requests_.push_back(GaiaCookieRequest::CreateListAccountsRequest()); |
| 376 } | 376 } |
| 377 } | 377 } |
| 378 | 378 |
| 379 void GaiaCookieManagerService::ForceOnCookieChangedProcessing() { | 379 void GaiaCookieManagerService::ForceOnCookieChangedProcessing() { |
| 380 GURL google_url = GaiaUrls::GetInstance()->google_url(); | 380 GURL google_url = GaiaUrls::GetInstance()->google_url(); |
| 381 net::CanonicalCookie cookie( | 381 std::unique_ptr<net::CanonicalCookie> cookie(net::CanonicalCookie::Create( |
| 382 google_url, kGaiaCookieName, "", google_url.host(), "", base::Time(), | 382 google_url, kGaiaCookieName, std::string(), google_url.host(), |
|
tfarina
2016/07/01 12:20:10
Matt, I had to keep host() in order to keep the un
mmenke
2016/07/01 16:21:00
Hrm...that's not a valid URL, and is apparently br
mmenke
2016/07/15 18:47:18
So here's my suggestion (Need to have one of the o
tfarina
2016/07/18 20:00:07
Done.
| |
| 383 base::Time(), base::Time(), false, false, | 383 std::string(), base::Time(), base::Time(), false, false, |
| 384 net::CookieSameSite::DEFAULT_MODE, net::COOKIE_PRIORITY_DEFAULT); | 384 net::CookieSameSite::DEFAULT_MODE, false, net::COOKIE_PRIORITY_DEFAULT)); |
| 385 OnCookieChanged(cookie, true); | 385 OnCookieChanged(*cookie, true); |
| 386 } | 386 } |
| 387 | 387 |
| 388 void GaiaCookieManagerService::LogOutAllAccounts() { | 388 void GaiaCookieManagerService::LogOutAllAccounts() { |
| 389 VLOG(1) << "GaiaCookieManagerService::LogOutAllAccounts"; | 389 VLOG(1) << "GaiaCookieManagerService::LogOutAllAccounts"; |
| 390 | 390 |
| 391 bool log_out_queued = false; | 391 bool log_out_queued = false; |
| 392 if (!requests_.empty()) { | 392 if (!requests_.empty()) { |
| 393 // Track requests to keep; all other unstarted requests will be removed. | 393 // Track requests to keep; all other unstarted requests will be removed. |
| 394 std::vector<GaiaCookieRequest> requests_to_keep; | 394 std::vector<GaiaCookieRequest> requests_to_keep; |
| 395 | 395 |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 715 break; | 715 break; |
| 716 case GaiaCookieRequestType::LIST_ACCOUNTS: | 716 case GaiaCookieRequestType::LIST_ACCOUNTS: |
| 717 uber_token_fetcher_.reset(); | 717 uber_token_fetcher_.reset(); |
| 718 signin_client_->DelayNetworkCall( | 718 signin_client_->DelayNetworkCall( |
| 719 base::Bind(&GaiaCookieManagerService::StartFetchingListAccounts, | 719 base::Bind(&GaiaCookieManagerService::StartFetchingListAccounts, |
| 720 base::Unretained(this))); | 720 base::Unretained(this))); |
| 721 break; | 721 break; |
| 722 }; | 722 }; |
| 723 } | 723 } |
| 724 } | 724 } |
| OLD | NEW |