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 "device/battery/battery_status_service.h" | 5 #include "device/battery/battery_status_service.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 const BatteryStatusService::BatteryUpdateCallback& | 98 const BatteryStatusService::BatteryUpdateCallback& |
99 BatteryStatusService::GetUpdateCallbackForTesting() const { | 99 BatteryStatusService::GetUpdateCallbackForTesting() const { |
100 return update_callback_; | 100 return update_callback_; |
101 } | 101 } |
102 | 102 |
103 void BatteryStatusService::SetBatteryManagerForTesting( | 103 void BatteryStatusService::SetBatteryManagerForTesting( |
104 std::unique_ptr<BatteryStatusManager> test_battery_manager) { | 104 std::unique_ptr<BatteryStatusManager> test_battery_manager) { |
105 battery_fetcher_ = std::move(test_battery_manager); | 105 battery_fetcher_ = std::move(test_battery_manager); |
106 status_ = mojom::BatteryStatus(); | 106 status_ = mojom::BatteryStatus(); |
107 status_updated_ = false; | 107 status_updated_ = false; |
| 108 is_shutdown_ = false; |
| 109 main_thread_task_runner_ = base::ThreadTaskRunnerHandle::Get(); |
108 } | 110 } |
109 | 111 |
110 } // namespace device | 112 } // namespace device |
OLD | NEW |