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

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

Issue 2919933002: Revert of ChromeOS: Per-user time zone: refactor tests first. (Closed)
Patch Set: Created 3 years, 6 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/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/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 registry->RegisterDictionaryPref(kSupervisedUserPasswordRevision); 127 registry->RegisterDictionaryPref(kSupervisedUserPasswordRevision);
128 128
129 registry->RegisterDictionaryPref(kSupervisedUserNeedPasswordUpdate); 129 registry->RegisterDictionaryPref(kSupervisedUserNeedPasswordUpdate);
130 registry->RegisterDictionaryPref(kSupervisedUserIncompleteKey); 130 registry->RegisterDictionaryPref(kSupervisedUserIncompleteKey);
131 } 131 }
132 132
133 SupervisedUserManagerImpl::SupervisedUserManagerImpl( 133 SupervisedUserManagerImpl::SupervisedUserManagerImpl(
134 ChromeUserManagerImpl* owner) 134 ChromeUserManagerImpl* owner)
135 : owner_(owner), cros_settings_(CrosSettings::Get()) { 135 : owner_(owner), cros_settings_(CrosSettings::Get()) {
136 // SupervisedUserManager instance should be used only on UI thread. 136 // SupervisedUserManager instance should be used only on UI thread.
137 // (or in unit_tests) 137 DCHECK_CURRENTLY_ON(BrowserThread::UI);
138 if (base::ThreadTaskRunnerHandle::IsSet())
139 DCHECK_CURRENTLY_ON(BrowserThread::UI);
140 authentication_.reset(new SupervisedUserAuthentication(this)); 138 authentication_.reset(new SupervisedUserAuthentication(this));
141 } 139 }
142 140
143 SupervisedUserManagerImpl::~SupervisedUserManagerImpl() { 141 SupervisedUserManagerImpl::~SupervisedUserManagerImpl() {
144 } 142 }
145 143
146 std::string SupervisedUserManagerImpl::GenerateUserId() { 144 std::string SupervisedUserManagerImpl::GenerateUserId() {
147 int counter = g_browser_process->local_state()-> 145 int counter = g_browser_process->local_state()->
148 GetInteger(kSupervisedUsersNextId); 146 GetInteger(kSupervisedUsersNextId);
149 std::string id; 147 std::string id;
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 } 524 }
527 525
528 void SupervisedUserManagerImpl::ConfigureSyncWithToken( 526 void SupervisedUserManagerImpl::ConfigureSyncWithToken(
529 Profile* profile, 527 Profile* profile,
530 const std::string& token) { 528 const std::string& token) {
531 if (!token.empty()) 529 if (!token.empty())
532 SupervisedUserServiceFactory::GetForProfile(profile)->InitSync(token); 530 SupervisedUserServiceFactory::GetForProfile(profile)->InitSync(token);
533 } 531 }
534 532
535 } // namespace chromeos 533 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698