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 "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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 cache.SetLocalAuthCredentialsOfProfileAtIndex(index, std::string()); | 178 cache.SetLocalAuthCredentialsOfProfileAtIndex(index, std::string()); |
179 cache.SetUserNameOfProfileAtIndex(index, base::string16()); | 179 cache.SetUserNameOfProfileAtIndex(index, base::string16()); |
180 cache.SetProfileSigninRequiredAtIndex(index, false); | 180 cache.SetProfileSigninRequiredAtIndex(index, false); |
181 } | 181 } |
182 | 182 |
183 net::URLRequestContextGetter* ChromeSigninClient::GetURLRequestContext() { | 183 net::URLRequestContextGetter* ChromeSigninClient::GetURLRequestContext() { |
184 return profile_->GetRequestContext(); | 184 return profile_->GetRequestContext(); |
185 } | 185 } |
186 | 186 |
187 bool ChromeSigninClient::ShouldMergeSigninCredentialsIntoCookieJar() { | 187 bool ChromeSigninClient::ShouldMergeSigninCredentialsIntoCookieJar() { |
188 // If inline sign in is enabled, but account consistency is not, the user's | 188 return !switches::IsEnableAccountConsistency(); |
189 // credentials should be merge into the cookie jar. | |
190 return !switches::IsEnableWebBasedSignin() && | |
191 !switches::IsEnableAccountConsistency(); | |
192 } | 189 } |
193 | 190 |
194 std::string ChromeSigninClient::GetProductVersion() { | 191 std::string ChromeSigninClient::GetProductVersion() { |
195 chrome::VersionInfo chrome_version; | 192 chrome::VersionInfo chrome_version; |
196 return chrome_version.CreateVersionString(); | 193 return chrome_version.CreateVersionString(); |
197 } | 194 } |
198 | 195 |
199 bool ChromeSigninClient::IsFirstRun() const { | 196 bool ChromeSigninClient::IsFirstRun() const { |
200 #if defined(OS_ANDROID) | 197 #if defined(OS_ANDROID) |
201 return false; | 198 return false; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 | 262 |
266 ProfileInfoCache& cache = g_browser_process->profile_manager()-> | 263 ProfileInfoCache& cache = g_browser_process->profile_manager()-> |
267 GetProfileInfoCache(); | 264 GetProfileInfoCache(); |
268 size_t index = cache.GetIndexOfProfileWithPath(profile_->GetPath()); | 265 size_t index = cache.GetIndexOfProfileWithPath(profile_->GetPath()); |
269 if (index == std::string::npos) | 266 if (index == std::string::npos) |
270 return; | 267 return; |
271 | 268 |
272 cache.SetProfileIsAuthErrorAtIndex(index, | 269 cache.SetProfileIsAuthErrorAtIndex(index, |
273 signin_error_controller_->HasError()); | 270 signin_error_controller_->HasError()); |
274 } | 271 } |
OLD | NEW |