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

Side by Side Diff: chrome/browser/signin/chrome_signin_client.cc

Issue 1075273002: Handle ListAccount fetches from within the GaiaCookieManagerService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a test post rebase Created 5 years, 7 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 "chrome/browser/signin/chrome_signin_client.h" 5 #include "chrome/browser/signin/chrome_signin_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/guid.h" 8 #include "base/guid.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 bool ChromeSigninClient::ProfileAllowsSigninCookies(Profile* profile) { 54 bool ChromeSigninClient::ProfileAllowsSigninCookies(Profile* profile) {
55 CookieSettings* cookie_settings = 55 CookieSettings* cookie_settings =
56 CookieSettings::Factory::GetForProfile(profile).get(); 56 CookieSettings::Factory::GetForProfile(profile).get();
57 return SettingsAllowSigninCookies(cookie_settings); 57 return SettingsAllowSigninCookies(cookie_settings);
58 } 58 }
59 59
60 // static 60 // static
61 bool ChromeSigninClient::SettingsAllowSigninCookies( 61 bool ChromeSigninClient::SettingsAllowSigninCookies(
62 CookieSettings* cookie_settings) { 62 CookieSettings* cookie_settings) {
63 GURL gaia_url = GaiaUrls::GetInstance()->gaia_url(); 63 GURL gaia_url = GaiaUrls::GetInstance()->gaia_url();
64 GURL google_url = GaiaUrls::GetInstance()->google_url();
64 return cookie_settings && 65 return cookie_settings &&
65 cookie_settings->IsSettingCookieAllowed(gaia_url, gaia_url); 66 cookie_settings->IsSettingCookieAllowed(gaia_url, gaia_url) &&
67 cookie_settings->IsSettingCookieAllowed(google_url, google_url);
66 } 68 }
67 69
68 PrefService* ChromeSigninClient::GetPrefs() { return profile_->GetPrefs(); } 70 PrefService* ChromeSigninClient::GetPrefs() { return profile_->GetPrefs(); }
69 71
70 scoped_refptr<TokenWebData> ChromeSigninClient::GetDatabase() { 72 scoped_refptr<TokenWebData> ChromeSigninClient::GetDatabase() {
71 return WebDataServiceFactory::GetTokenWebDataForProfile( 73 return WebDataServiceFactory::GetTokenWebDataForProfile(
72 profile_, ServiceAccessType::EXPLICIT_ACCESS); 74 profile_, ServiceAccessType::EXPLICIT_ACCESS);
73 } 75 }
74 76
75 bool ChromeSigninClient::CanRevokeCredentials() { 77 bool ChromeSigninClient::CanRevokeCredentials() {
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 213
212 ProfileInfoCache& cache = g_browser_process->profile_manager()-> 214 ProfileInfoCache& cache = g_browser_process->profile_manager()->
213 GetProfileInfoCache(); 215 GetProfileInfoCache();
214 size_t index = cache.GetIndexOfProfileWithPath(profile_->GetPath()); 216 size_t index = cache.GetIndexOfProfileWithPath(profile_->GetPath());
215 if (index == std::string::npos) 217 if (index == std::string::npos)
216 return; 218 return;
217 219
218 cache.SetProfileIsAuthErrorAtIndex(index, 220 cache.SetProfileIsAuthErrorAtIndex(index,
219 signin_error_controller_->HasError()); 221 signin_error_controller_->HasError());
220 } 222 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/account_reconcilor_unittest.cc ('k') | chrome/browser/signin/fake_account_reconcilor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698