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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // process. | 108 // process. |
109 signin_hosts_observed_.erase(host); | 109 signin_hosts_observed_.erase(host); |
110 if (signin_host_id_ == host->GetID()) | 110 if (signin_host_id_ == host->GetID()) |
111 signin_host_id_ = ChildProcessHost::kInvalidUniqueID; | 111 signin_host_id_ = ChildProcessHost::kInvalidUniqueID; |
112 } | 112 } |
113 | 113 |
114 PrefService* ChromeSigninClient::GetPrefs() { return profile_->GetPrefs(); } | 114 PrefService* ChromeSigninClient::GetPrefs() { return profile_->GetPrefs(); } |
115 | 115 |
116 scoped_refptr<TokenWebData> ChromeSigninClient::GetDatabase() { | 116 scoped_refptr<TokenWebData> ChromeSigninClient::GetDatabase() { |
117 return WebDataServiceFactory::GetTokenWebDataForProfile( | 117 return WebDataServiceFactory::GetTokenWebDataForProfile( |
118 profile_, Profile::EXPLICIT_ACCESS); | 118 profile_, ServiceAccessType::EXPLICIT_ACCESS); |
119 } | 119 } |
120 | 120 |
121 bool ChromeSigninClient::CanRevokeCredentials() { | 121 bool ChromeSigninClient::CanRevokeCredentials() { |
122 #if defined(OS_CHROMEOS) | 122 #if defined(OS_CHROMEOS) |
123 // UserManager may not exist in unit_tests. | 123 // UserManager may not exist in unit_tests. |
124 if (user_manager::UserManager::IsInitialized() && | 124 if (user_manager::UserManager::IsInitialized() && |
125 user_manager::UserManager::Get()->IsLoggedInAsSupervisedUser()) { | 125 user_manager::UserManager::Get()->IsLoggedInAsSupervisedUser()) { |
126 // Don't allow revoking credentials for Chrome OS supervised users. | 126 // Don't allow revoking credentials for Chrome OS supervised users. |
127 // See http://crbug.com/332032 | 127 // See http://crbug.com/332032 |
128 LOG(ERROR) << "Attempt to revoke supervised user refresh " | 128 LOG(ERROR) << "Attempt to revoke supervised user refresh " |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 | 225 |
226 void ChromeSigninClient::PostSignedIn(const std::string& account_id, | 226 void ChromeSigninClient::PostSignedIn(const std::string& account_id, |
227 const std::string& username, | 227 const std::string& username, |
228 const std::string& password) { | 228 const std::string& password) { |
229 #if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS) | 229 #if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS) |
230 // Don't store password hash except when lock is available for the user. | 230 // Don't store password hash except when lock is available for the user. |
231 if (!password.empty() && profiles::IsLockAvailable(profile_)) | 231 if (!password.empty() && profiles::IsLockAvailable(profile_)) |
232 chrome::SetLocalAuthCredentials(profile_, password); | 232 chrome::SetLocalAuthCredentials(profile_, password); |
233 #endif | 233 #endif |
234 } | 234 } |
OLD | NEW |