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

Side by Side Diff: ios/chrome/browser/signin/gaia_auth_fetcher_ios.mm

Issue 1522873002: Force Account Consistency off for Logout call on iOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « google_apis/gaia/gaia_auth_fetcher.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ios/chrome/browser/signin/gaia_auth_fetcher_ios.h" 5 #include "ios/chrome/browser/signin/gaia_auth_fetcher_ios.h"
6 6
7 #import <WebKit/WebKit.h> 7 #import <WebKit/WebKit.h>
8 8
9 #include "base/json/string_escape.h" 9 #include "base/json/string_escape.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 } 313 }
314 314
315 #pragma mark - GaiaAuthFetcherIOS definition 315 #pragma mark - GaiaAuthFetcherIOS definition
316 316
317 GaiaAuthFetcherIOS::GaiaAuthFetcherIOS(GaiaAuthConsumer* consumer, 317 GaiaAuthFetcherIOS::GaiaAuthFetcherIOS(GaiaAuthConsumer* consumer,
318 const std::string& source, 318 const std::string& source,
319 net::URLRequestContextGetter* getter, 319 net::URLRequestContextGetter* getter,
320 web::BrowserState* browser_state) 320 web::BrowserState* browser_state)
321 : GaiaAuthFetcher(consumer, source, getter), 321 : GaiaAuthFetcher(consumer, source, getter),
322 bridge_(new GaiaAuthFetcherIOSBridge(this, browser_state)), 322 bridge_(new GaiaAuthFetcherIOSBridge(this, browser_state)),
323 browser_state_(browser_state) {} 323 browser_state_(browser_state) {
324 // Account Consistency needs to be disabled for the Logout call. There is a
325 // race with the cookie clearing request (handled by
326 // AccountConsistencyService), so we invalidate the cookie for the call.
327 SetLogoutHeaders("Cookie: X-CHROME-CONNECTED=EXPIRED;");
328 }
324 329
325 GaiaAuthFetcherIOS::~GaiaAuthFetcherIOS() { 330 GaiaAuthFetcherIOS::~GaiaAuthFetcherIOS() {
326 } 331 }
327 332
328 void GaiaAuthFetcherIOS::CreateAndStartGaiaFetcher(const std::string& body, 333 void GaiaAuthFetcherIOS::CreateAndStartGaiaFetcher(const std::string& body,
329 const std::string& headers, 334 const std::string& headers,
330 const GURL& gaia_gurl, 335 const GURL& gaia_gurl,
331 int load_flags) { 336 int load_flags) {
332 DCHECK(!HasPendingFetch()) << "Tried to fetch two things at once!"; 337 DCHECK(!HasPendingFetch()) << "Tried to fetch two things at once!";
333 338
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 376
372 void GaiaAuthFetcherIOS::SetShouldUseGaiaAuthFetcherIOSForTesting( 377 void GaiaAuthFetcherIOS::SetShouldUseGaiaAuthFetcherIOSForTesting(
373 bool use_gaia_fetcher_ios) { 378 bool use_gaia_fetcher_ios) {
374 g_should_use_gaia_auth_fetcher_ios = use_gaia_fetcher_ios; 379 g_should_use_gaia_auth_fetcher_ios = use_gaia_fetcher_ios;
375 } 380 }
376 381
377 bool GaiaAuthFetcherIOS::ShouldUseGaiaAuthFetcherIOS() { 382 bool GaiaAuthFetcherIOS::ShouldUseGaiaAuthFetcherIOS() {
378 return experimental_flags::IsWKWebViewEnabled() && 383 return experimental_flags::IsWKWebViewEnabled() &&
379 g_should_use_gaia_auth_fetcher_ios; 384 g_should_use_gaia_auth_fetcher_ios;
380 } 385 }
OLDNEW
« no previous file with comments | « google_apis/gaia/gaia_auth_fetcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698