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

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

Issue 839193002: Move ServiceAccessType into //components/keyed_service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on android Created 5 years, 11 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/template_url_service_test_util.cc ('k') | chrome/browser/ssl/ssl_blocking_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698