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

Side by Side Diff: components/user_manager/fake_user_manager.cc

Issue 2890843002: Policy implementation for encryptfs to ext4 migration strategy (Closed)
Patch Set: Fixed review comments 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 "components/user_manager/fake_user_manager.h" 5 #include "components/user_manager/fake_user_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/sys_info.h" 11 #include "base/sys_info.h"
12 #include "base/task_runner.h" 12 #include "base/task_runner.h"
13 #include "chromeos/chromeos_switches.h" 13 #include "chromeos/chromeos_switches.h"
14 #include "components/prefs/pref_registry_simple.h"
15 #include "components/prefs/pref_service_factory.h"
16 #include "components/prefs/testing_pref_service.h"
17 #include "components/prefs/testing_pref_store.h"
14 #include "components/user_manager/user_names.h" 18 #include "components/user_manager/user_names.h"
15 #include "components/user_manager/user_type.h" 19 #include "components/user_manager/user_type.h"
16 20
17 namespace { 21 namespace {
18 22
19 class FakeTaskRunner : public base::TaskRunner { 23 class FakeTaskRunner : public base::TaskRunner {
20 public: 24 public:
21 bool PostDelayedTask(const tracked_objects::Location& from_here, 25 bool PostDelayedTask(const tracked_objects::Location& from_here,
22 base::OnceClosure task, 26 base::OnceClosure task,
23 base::TimeDelta delay) override { 27 base::TimeDelta delay) override {
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 271
268 void FakeUserManager::SetEphemeralUsersEnabled(bool enabled) { 272 void FakeUserManager::SetEphemeralUsersEnabled(bool enabled) {
269 UserManagerBase::SetEphemeralUsersEnabled(enabled); 273 UserManagerBase::SetEphemeralUsersEnabled(enabled);
270 } 274 }
271 275
272 const std::string& FakeUserManager::GetApplicationLocale() const { 276 const std::string& FakeUserManager::GetApplicationLocale() const {
273 static const std::string default_locale("en-US"); 277 static const std::string default_locale("en-US");
274 return default_locale; 278 return default_locale;
275 } 279 }
276 280
281 void FakeUserManager::SetLocalState(PrefService* pref_service) {
282 pref_service_ = pref_service;
283 }
284
277 PrefService* FakeUserManager::GetLocalState() const { 285 PrefService* FakeUserManager::GetLocalState() const {
278 return nullptr; 286 return pref_service_;
279 } 287 }
280 288
281 bool FakeUserManager::IsEnterpriseManaged() const { 289 bool FakeUserManager::IsEnterpriseManaged() const {
282 return false; 290 return false;
283 } 291 }
284 292
285 bool FakeUserManager::IsDemoApp(const AccountId& account_id) const { 293 bool FakeUserManager::IsDemoApp(const AccountId& account_id) const {
286 return account_id == DemoAccountId(); 294 return account_id == DemoAccountId();
287 } 295 }
288 296
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 NOTIMPLEMENTED(); 365 NOTIMPLEMENTED();
358 return; 366 return;
359 } 367 }
360 368
361 bool FakeUserManager::IsValidDefaultUserImageId(int image_index) const { 369 bool FakeUserManager::IsValidDefaultUserImageId(int image_index) const {
362 NOTIMPLEMENTED(); 370 NOTIMPLEMENTED();
363 return false; 371 return false;
364 } 372 }
365 373
366 } // namespace user_manager 374 } // namespace user_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698