| OLD | NEW |
| 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/callback_helpers.h" |
| 10 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 11 #include "base/sys_info.h" | 12 #include "base/sys_info.h" |
| 12 #include "base/task_runner.h" | 13 #include "base/task_runner.h" |
| 13 #include "chromeos/chromeos_switches.h" | 14 #include "chromeos/chromeos_switches.h" |
| 14 #include "components/user_manager/user_names.h" | 15 #include "components/user_manager/user_names.h" |
| 15 #include "components/user_manager/user_type.h" | 16 #include "components/user_manager/user_type.h" |
| 16 | 17 |
| 17 namespace { | 18 namespace { |
| 18 | 19 |
| 19 class FakeTaskRunner : public base::TaskRunner { | 20 class FakeTaskRunner : public base::TaskRunner { |
| 20 public: | 21 public: |
| 21 bool PostDelayedTask(const tracked_objects::Location& from_here, | 22 bool PostDelayedTask(const tracked_objects::Location& from_here, |
| 22 const base::Closure& task, | 23 base::Closure task, |
| 23 base::TimeDelta delay) override { | 24 base::TimeDelta delay) override { |
| 24 task.Run(); | 25 base::ResetAndReturn(&task).Run(); |
| 25 return true; | 26 return true; |
| 26 } | 27 } |
| 27 bool RunsTasksOnCurrentThread() const override { return true; } | 28 bool RunsTasksOnCurrentThread() const override { return true; } |
| 28 | 29 |
| 29 protected: | 30 protected: |
| 30 ~FakeTaskRunner() override {} | 31 ~FakeTaskRunner() override {} |
| 31 }; | 32 }; |
| 32 | 33 |
| 33 } // namespace | 34 } // namespace |
| 34 | 35 |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 NOTIMPLEMENTED(); | 353 NOTIMPLEMENTED(); |
| 353 return; | 354 return; |
| 354 } | 355 } |
| 355 | 356 |
| 356 bool FakeUserManager::IsValidDefaultUserImageId(int image_index) const { | 357 bool FakeUserManager::IsValidDefaultUserImageId(int image_index) const { |
| 357 NOTIMPLEMENTED(); | 358 NOTIMPLEMENTED(); |
| 358 return false; | 359 return false; |
| 359 } | 360 } |
| 360 | 361 |
| 361 } // namespace user_manager | 362 } // namespace user_manager |
| OLD | NEW |