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

Side by Side Diff: chrome/browser/chromeos/login/users/supervised_user_manager_impl.cc

Issue 444903002: [cros] user_manager component - move UserManagerBase and UserManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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 | Annotate | Revision Log
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/chromeos/login/users/supervised_user_manager_impl.h" 5 #include "chrome/browser/chromeos/login/users/supervised_user_manager_impl.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/prefs/pref_registry_simple.h" 9 #include "base/prefs/pref_registry_simple.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
11 #include "base/prefs/scoped_user_pref_update.h" 11 #include "base/prefs/scoped_user_pref_update.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
14 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
15 #include "base/threading/sequenced_worker_pool.h" 15 #include "base/threading/sequenced_worker_pool.h"
16 #include "base/values.h" 16 #include "base/values.h"
17 #include "chrome/browser/browser_process.h" 17 #include "chrome/browser/browser_process.h"
18 #include "chrome/browser/chromeos/login/supervised/supervised_user_authenticatio n.h" 18 #include "chrome/browser/chromeos/login/supervised/supervised_user_authenticatio n.h"
19 #include "chrome/browser/chromeos/login/supervised/supervised_user_constants.h" 19 #include "chrome/browser/chromeos/login/supervised/supervised_user_constants.h"
20 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" 20 #include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h"
21 #include "chrome/browser/chromeos/profiles/profile_helper.h" 21 #include "chrome/browser/chromeos/profiles/profile_helper.h"
22 #include "chrome/browser/supervised_user/supervised_user_service.h" 22 #include "chrome/browser/supervised_user/supervised_user_service.h"
23 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" 23 #include "chrome/browser/supervised_user/supervised_user_service_factory.h"
24 #include "chromeos/login/user_names.h" 24 #include "chromeos/login/user_names.h"
25 #include "chromeos/settings/cros_settings_names.h" 25 #include "chromeos/settings/cros_settings_names.h"
26 #include "components/user_manager/user_type.h" 26 #include "components/user_manager/user_type.h"
27 #include "content/public/browser/browser_thread.h" 27 #include "content/public/browser/browser_thread.h"
28 #include "google_apis/gaia/gaia_auth_util.h" 28 #include "google_apis/gaia/gaia_auth_util.h"
29 29
30 using content::BrowserThread; 30 using content::BrowserThread;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 registry->RegisterDictionaryPref(kSupervisedUserManagerDisplayEmails); 122 registry->RegisterDictionaryPref(kSupervisedUserManagerDisplayEmails);
123 123
124 registry->RegisterDictionaryPref(kSupervisedUserPasswordSchema); 124 registry->RegisterDictionaryPref(kSupervisedUserPasswordSchema);
125 registry->RegisterDictionaryPref(kSupervisedUserPasswordSalt); 125 registry->RegisterDictionaryPref(kSupervisedUserPasswordSalt);
126 registry->RegisterDictionaryPref(kSupervisedUserPasswordRevision); 126 registry->RegisterDictionaryPref(kSupervisedUserPasswordRevision);
127 127
128 registry->RegisterDictionaryPref(kSupervisedUserNeedPasswordUpdate); 128 registry->RegisterDictionaryPref(kSupervisedUserNeedPasswordUpdate);
129 registry->RegisterDictionaryPref(kSupervisedUserIncompleteKey); 129 registry->RegisterDictionaryPref(kSupervisedUserIncompleteKey);
130 } 130 }
131 131
132 SupervisedUserManagerImpl::SupervisedUserManagerImpl(ChromeUserManager* owner) 132 SupervisedUserManagerImpl::SupervisedUserManagerImpl(
133 ChromeUserManagerImpl* owner)
133 : owner_(owner), cros_settings_(CrosSettings::Get()) { 134 : owner_(owner), cros_settings_(CrosSettings::Get()) {
134 // SupervisedUserManager instance should be used only on UI thread. 135 // SupervisedUserManager instance should be used only on UI thread.
135 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 136 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
136 authentication_.reset(new SupervisedUserAuthentication(this)); 137 authentication_.reset(new SupervisedUserAuthentication(this));
137 } 138 }
138 139
139 SupervisedUserManagerImpl::~SupervisedUserManagerImpl() { 140 SupervisedUserManagerImpl::~SupervisedUserManagerImpl() {
140 } 141 }
141 142
142 std::string SupervisedUserManagerImpl::GenerateUserId() { 143 std::string SupervisedUserManagerImpl::GenerateUserId() {
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 } 519 }
519 520
520 void SupervisedUserManagerImpl::ConfigureSyncWithToken( 521 void SupervisedUserManagerImpl::ConfigureSyncWithToken(
521 Profile* profile, 522 Profile* profile,
522 const std::string& token) { 523 const std::string& token) {
523 if (!token.empty()) 524 if (!token.empty())
524 SupervisedUserServiceFactory::GetForProfile(profile)->InitSync(token); 525 SupervisedUserServiceFactory::GetForProfile(profile)->InitSync(token);
525 } 526 }
526 527
527 } // namespace chromeos 528 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/users/supervised_user_manager_impl.h ('k') | chrome/browser/chromeos/login/users/user_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698