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

Side by Side Diff: chrome/browser/chromeos/login/users/chrome_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/chrome_user_manager_impl.h" 5 #include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cstddef> 9 #include <cstddef>
10 #include <set> 10 #include <set>
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 enterprise_user_session_metrics::RegisterPrefs(registry); 187 enterprise_user_session_metrics::RegisterPrefs(registry);
188 } 188 }
189 189
190 // static 190 // static
191 std::unique_ptr<ChromeUserManager> 191 std::unique_ptr<ChromeUserManager>
192 ChromeUserManagerImpl::CreateChromeUserManager() { 192 ChromeUserManagerImpl::CreateChromeUserManager() {
193 return std::unique_ptr<ChromeUserManager>(new ChromeUserManagerImpl()); 193 return std::unique_ptr<ChromeUserManager>(new ChromeUserManagerImpl());
194 } 194 }
195 195
196 ChromeUserManagerImpl::ChromeUserManagerImpl() 196 ChromeUserManagerImpl::ChromeUserManagerImpl()
197 : ChromeUserManager(base::ThreadTaskRunnerHandle::IsSet() 197 : ChromeUserManager(base::ThreadTaskRunnerHandle::Get()),
198 ? base::ThreadTaskRunnerHandle::Get()
199 : scoped_refptr<base::TaskRunner>()),
200 cros_settings_(CrosSettings::Get()), 198 cros_settings_(CrosSettings::Get()),
201 device_local_account_policy_service_(NULL), 199 device_local_account_policy_service_(NULL),
202 supervised_user_manager_(new SupervisedUserManagerImpl(this)), 200 supervised_user_manager_(new SupervisedUserManagerImpl(this)),
203 bootstrap_manager_(new BootstrapManager(this)), 201 bootstrap_manager_(new BootstrapManager(this)),
204 weak_factory_(this) { 202 weak_factory_(this) {
205 UpdateNumberOfUsers(); 203 UpdateNumberOfUsers();
206 204
207 // UserManager instance should be used only on UI thread. 205 // UserManager instance should be used only on UI thread.
208 // (or in unit tests) 206 DCHECK_CURRENTLY_ON(BrowserThread::UI);
209 if (base::ThreadTaskRunnerHandle::IsSet())
210 DCHECK_CURRENTLY_ON(BrowserThread::UI);
211
212 registrar_.Add(this, 207 registrar_.Add(this,
213 chrome::NOTIFICATION_OWNERSHIP_STATUS_CHANGED, 208 chrome::NOTIFICATION_OWNERSHIP_STATUS_CHANGED,
214 content::NotificationService::AllSources()); 209 content::NotificationService::AllSources());
215 registrar_.Add(this, 210 registrar_.Add(this,
216 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, 211 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED,
217 content::NotificationService::AllSources()); 212 content::NotificationService::AllSources());
218 registrar_.Add(this, 213 registrar_.Add(this,
219 chrome::NOTIFICATION_PROFILE_CREATED, 214 chrome::NOTIFICATION_PROFILE_CREATED,
220 content::NotificationService::AllSources()); 215 content::NotificationService::AllSources());
221 216
(...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1389 break; 1384 break;
1390 default: 1385 default:
1391 NOTREACHED(); 1386 NOTREACHED();
1392 break; 1387 break;
1393 } 1388 }
1394 1389
1395 return user; 1390 return user;
1396 } 1391 }
1397 1392
1398 } // namespace chromeos 1393 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698