Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(518)

Side by Side Diff: components/signin/core/browser/gaia_cookie_manager_service.cc

Issue 1773133002: SameSite: Implement 'Strict'/'Lax' attribute parsing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mmenke@ Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 } else if (std::find_if(requests_.begin(), requests_.end(), 366 } else if (std::find_if(requests_.begin(), requests_.end(),
367 [](const GaiaCookieRequest& request) { 367 [](const GaiaCookieRequest& request) {
368 return request.request_type() == LIST_ACCOUNTS; 368 return request.request_type() == LIST_ACCOUNTS;
369 }) == requests_.end()) { 369 }) == requests_.end()) {
370 requests_.push_back(GaiaCookieRequest::CreateListAccountsRequest()); 370 requests_.push_back(GaiaCookieRequest::CreateListAccountsRequest());
371 } 371 }
372 } 372 }
373 373
374 void GaiaCookieManagerService::ForceOnCookieChangedProcessing() { 374 void GaiaCookieManagerService::ForceOnCookieChangedProcessing() {
375 GURL google_url = GaiaUrls::GetInstance()->google_url(); 375 GURL google_url = GaiaUrls::GetInstance()->google_url();
376 net::CanonicalCookie cookie(google_url, kGaiaCookieName, "", 376 net::CanonicalCookie cookie(
377 google_url.host(), "", base::Time(), base::Time(), 377 google_url, kGaiaCookieName, "", google_url.host(), "", base::Time(),
378 base::Time(), false, false, false, 378 base::Time(), base::Time(), false, false,
379 net::COOKIE_PRIORITY_DEFAULT); 379 net::CookieSameSite::DEFAULT_MODE, net::COOKIE_PRIORITY_DEFAULT);
380 OnCookieChanged(cookie, true); 380 OnCookieChanged(cookie, true);
381 } 381 }
382 382
383 void GaiaCookieManagerService::LogOutAllAccounts() { 383 void GaiaCookieManagerService::LogOutAllAccounts() {
384 VLOG(1) << "GaiaCookieManagerService::LogOutAllAccounts"; 384 VLOG(1) << "GaiaCookieManagerService::LogOutAllAccounts";
385 385
386 bool log_out_queued = false; 386 bool log_out_queued = false;
387 if (!requests_.empty()) { 387 if (!requests_.empty()) {
388 // Track requests to keep; all other unstarted requests will be removed. 388 // Track requests to keep; all other unstarted requests will be removed.
389 std::vector<GaiaCookieRequest> requests_to_keep; 389 std::vector<GaiaCookieRequest> requests_to_keep;
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 break; 706 break;
707 case GaiaCookieRequestType::LIST_ACCOUNTS: 707 case GaiaCookieRequestType::LIST_ACCOUNTS:
708 uber_token_fetcher_.reset(); 708 uber_token_fetcher_.reset();
709 signin_client_->DelayNetworkCall( 709 signin_client_->DelayNetworkCall(
710 base::Bind(&GaiaCookieManagerService::StartFetchingListAccounts, 710 base::Bind(&GaiaCookieManagerService::StartFetchingListAccounts,
711 base::Unretained(this))); 711 base::Unretained(this)));
712 break; 712 break;
713 }; 713 };
714 } 714 }
715 } 715 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/cookies/cookies_unittest.cc ('k') | content/browser/net/quota_policy_cookie_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698