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

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

Issue 2633663003: Implements strict secure cookies as the default behavior in //net (Closed)
Patch Set: Created 3 years, 11 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 10
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 }) == requests_.end()) { 395 }) == requests_.end()) {
396 requests_.push_back(GaiaCookieRequest::CreateListAccountsRequest(source)); 396 requests_.push_back(GaiaCookieRequest::CreateListAccountsRequest(source));
397 } 397 }
398 } 398 }
399 399
400 void GaiaCookieManagerService::ForceOnCookieChangedProcessing() { 400 void GaiaCookieManagerService::ForceOnCookieChangedProcessing() {
401 GURL google_url = GaiaUrls::GetInstance()->google_url(); 401 GURL google_url = GaiaUrls::GetInstance()->google_url();
402 std::unique_ptr<net::CanonicalCookie> cookie(net::CanonicalCookie::Create( 402 std::unique_ptr<net::CanonicalCookie> cookie(net::CanonicalCookie::Create(
403 google_url, kGaiaCookieName, std::string(), "." + google_url.host(), 403 google_url, kGaiaCookieName, std::string(), "." + google_url.host(),
404 std::string(), base::Time(), base::Time(), false, false, 404 std::string(), base::Time(), base::Time(), false, false,
405 net::CookieSameSite::DEFAULT_MODE, false, net::COOKIE_PRIORITY_DEFAULT)); 405 net::CookieSameSite::DEFAULT_MODE, net::COOKIE_PRIORITY_DEFAULT));
406 OnCookieChanged(*cookie, net::CookieStore::ChangeCause::UNKNOWN_DELETION); 406 OnCookieChanged(*cookie, net::CookieStore::ChangeCause::UNKNOWN_DELETION);
407 } 407 }
408 408
409 void GaiaCookieManagerService::LogOutAllAccounts(const std::string& source) { 409 void GaiaCookieManagerService::LogOutAllAccounts(const std::string& source) {
410 VLOG(1) << "GaiaCookieManagerService::LogOutAllAccounts"; 410 VLOG(1) << "GaiaCookieManagerService::LogOutAllAccounts";
411 411
412 bool log_out_queued = false; 412 bool log_out_queued = false;
413 if (!requests_.empty()) { 413 if (!requests_.empty()) {
414 // Track requests to keep; all other unstarted requests will be removed. 414 // Track requests to keep; all other unstarted requests will be removed.
415 std::vector<GaiaCookieRequest> requests_to_keep; 415 std::vector<GaiaCookieRequest> requests_to_keep;
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698