| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/sessions/core/base_session_service.h" | 5 #include "components/sessions/core/base_session_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" |
| 11 #include "base/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
| 12 #include "base/thread_task_runner_handle.h" | |
| 13 #include "base/threading/thread.h" | 12 #include "base/threading/thread.h" |
| 13 #include "base/threading/thread_task_runner_handle.h" |
| 14 #include "components/sessions/core/base_session_service_delegate.h" | 14 #include "components/sessions/core/base_session_service_delegate.h" |
| 15 #include "components/sessions/core/session_backend.h" | 15 #include "components/sessions/core/session_backend.h" |
| 16 | 16 |
| 17 // BaseSessionService --------------------------------------------------------- | 17 // BaseSessionService --------------------------------------------------------- |
| 18 | 18 |
| 19 namespace sessions { | 19 namespace sessions { |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 // Helper used by ScheduleGetLastSessionCommands. It runs callback on TaskRunner | 22 // Helper used by ScheduleGetLastSessionCommands. It runs callback on TaskRunner |
| 23 // thread if it's not canceled. | 23 // thread if it's not canceled. |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 pool->PostSequencedWorkerTask(sequence_token_, from_here, task); | 181 pool->PostSequencedWorkerTask(sequence_token_, from_here, task); |
| 182 } else { | 182 } else { |
| 183 // Fall back to executing on the main thread if the sequence | 183 // Fall back to executing on the main thread if the sequence |
| 184 // worker pool has been requested to shutdown (around shutdown | 184 // worker pool has been requested to shutdown (around shutdown |
| 185 // time). | 185 // time). |
| 186 task.Run(); | 186 task.Run(); |
| 187 } | 187 } |
| 188 } | 188 } |
| 189 | 189 |
| 190 } // namespace sessions | 190 } // namespace sessions |
| OLD | NEW |