| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/system/automatic_reboot_manager.h" | 5 #include "chrome/browser/chromeos/system/automatic_reboot_manager.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 base::Closure task = tasks_.top().second; | 302 base::Closure task = tasks_.top().second; |
| 303 tasks_.pop(); | 303 tasks_.pop(); |
| 304 task.Run(); | 304 task.Run(); |
| 305 blocking_pool->FlushForTesting(); | 305 blocking_pool->FlushForTesting(); |
| 306 } | 306 } |
| 307 } | 307 } |
| 308 | 308 |
| 309 bool MockTimeSingleThreadTaskRunner::TemporalOrder::operator()( | 309 bool MockTimeSingleThreadTaskRunner::TemporalOrder::operator()( |
| 310 const std::pair<base::TimeTicks, base::Closure>& first_task, | 310 const std::pair<base::TimeTicks, base::Closure>& first_task, |
| 311 const std::pair<base::TimeTicks, base::Closure>& second_task) const { | 311 const std::pair<base::TimeTicks, base::Closure>& second_task) const { |
| 312 return first_task.first >= second_task.first; | 312 return first_task.first > second_task.first; |
| 313 } | 313 } |
| 314 | 314 |
| 315 MockTimeSingleThreadTaskRunner::~MockTimeSingleThreadTaskRunner() { | 315 MockTimeSingleThreadTaskRunner::~MockTimeSingleThreadTaskRunner() { |
| 316 } | 316 } |
| 317 | 317 |
| 318 MockTimeTickClock::MockTimeTickClock( | 318 MockTimeTickClock::MockTimeTickClock( |
| 319 scoped_refptr<MockTimeSingleThreadTaskRunner> task_runner) | 319 scoped_refptr<MockTimeSingleThreadTaskRunner> task_runner) |
| 320 : task_runner_(task_runner) { | 320 : task_runner_(task_runner) { |
| 321 } | 321 } |
| 322 | 322 |
| (...skipping 1730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2053 INSTANTIATE_TEST_CASE_P( | 2053 INSTANTIATE_TEST_CASE_P( |
| 2054 AutomaticRebootManagerTestInstance, | 2054 AutomaticRebootManagerTestInstance, |
| 2055 AutomaticRebootManagerTest, | 2055 AutomaticRebootManagerTest, |
| 2056 ::testing::Values( | 2056 ::testing::Values( |
| 2057 AUTOMATIC_REBOOT_MANAGER_TEST_SCENARIO_LOGIN_SCREEN, | 2057 AUTOMATIC_REBOOT_MANAGER_TEST_SCENARIO_LOGIN_SCREEN, |
| 2058 AUTOMATIC_REBOOT_MANAGER_TEST_SCENARIO_KIOSK_APP_SESSION, | 2058 AUTOMATIC_REBOOT_MANAGER_TEST_SCENARIO_KIOSK_APP_SESSION, |
| 2059 AUTOMATIC_REBOOT_MANAGER_TEST_SCENARIO_NON_KIOSK_APP_SESSION)); | 2059 AUTOMATIC_REBOOT_MANAGER_TEST_SCENARIO_NON_KIOSK_APP_SESSION)); |
| 2060 | 2060 |
| 2061 } // namespace system | 2061 } // namespace system |
| 2062 } // namespace chromeos | 2062 } // namespace chromeos |
| OLD | NEW |