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