| 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/base_session_service.h" | 5 #include "components/sessions/core/base_session_service.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
| 11 #include "base/threading/thread.h" | 11 #include "base/threading/thread.h" |
| 12 #include "components/sessions/base_session_service_delegate.h" | 12 #include "components/sessions/core/base_session_service_delegate.h" |
| 13 #include "components/sessions/session_backend.h" | 13 #include "components/sessions/core/session_backend.h" |
| 14 | 14 |
| 15 // BaseSessionService --------------------------------------------------------- | 15 // BaseSessionService --------------------------------------------------------- |
| 16 | 16 |
| 17 namespace sessions { | 17 namespace sessions { |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 // Helper used by ScheduleGetLastSessionCommands. It runs callback on TaskRunner | 20 // Helper used by ScheduleGetLastSessionCommands. It runs callback on TaskRunner |
| 21 // thread if it's not canceled. | 21 // thread if it's not canceled. |
| 22 void RunIfNotCanceled( | 22 void RunIfNotCanceled( |
| 23 const base::CancelableTaskTracker::IsCanceledCallback& is_canceled, | 23 const base::CancelableTaskTracker::IsCanceledCallback& is_canceled, |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 pool->PostSequencedWorkerTask(sequence_token_, from_here, task); | 176 pool->PostSequencedWorkerTask(sequence_token_, from_here, task); |
| 177 } else { | 177 } else { |
| 178 // Fall back to executing on the main thread if the sequence | 178 // Fall back to executing on the main thread if the sequence |
| 179 // worker pool has been requested to shutdown (around shutdown | 179 // worker pool has been requested to shutdown (around shutdown |
| 180 // time). | 180 // time). |
| 181 task.Run(); | 181 task.Run(); |
| 182 } | 182 } |
| 183 } | 183 } |
| 184 | 184 |
| 185 } // namespace sessions | 185 } // namespace sessions |
| OLD | NEW |