OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef BASE_THREADING_THREAD_RESTRICTIONS_H_ | 5 #ifndef BASE_THREADING_THREAD_RESTRICTIONS_H_ |
6 #define BASE_THREADING_THREAD_RESTRICTIONS_H_ | 6 #define BASE_THREADING_THREAD_RESTRICTIONS_H_ |
7 | 7 |
8 #include "base/base_export.h" | 8 #include "base/base_export.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 namespace android { | 85 namespace android { |
86 class JavaHandlerThread; | 86 class JavaHandlerThread; |
87 } | 87 } |
88 | 88 |
89 namespace internal { | 89 namespace internal { |
90 class TaskTracker; | 90 class TaskTracker; |
91 } | 91 } |
92 | 92 |
93 class SequencedWorkerPool; | 93 class SequencedWorkerPool; |
94 class SimpleThread; | |
95 class Thread; | 94 class Thread; |
96 class ThreadTestHelper; | 95 class ThreadTestHelper; |
97 | 96 |
98 // Certain behavior is disallowed on certain threads. ThreadRestrictions helps | 97 // Certain behavior is disallowed on certain threads. ThreadRestrictions helps |
99 // enforce these rules. Examples of such rules: | 98 // enforce these rules. Examples of such rules: |
100 // | 99 // |
101 // * Do not do blocking IO (makes the thread janky) | 100 // * Do not do blocking IO (makes the thread janky) |
102 // * Do not access Singleton/LazyInstance (may lead to shutdown crashes) | 101 // * Do not access Singleton/LazyInstance (may lead to shutdown crashes) |
103 // | 102 // |
104 // Here's more about how the protection works: | 103 // Here's more about how the protection works: |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 friend class ::HistogramSynchronizer; | 182 friend class ::HistogramSynchronizer; |
184 friend class internal::TaskTracker; | 183 friend class internal::TaskTracker; |
185 friend class ::ScopedAllowWaitForLegacyWebViewApi; | 184 friend class ::ScopedAllowWaitForLegacyWebViewApi; |
186 friend class cc::CompletionEvent; | 185 friend class cc::CompletionEvent; |
187 friend class cc::SingleThreadTaskGraphRunner; | 186 friend class cc::SingleThreadTaskGraphRunner; |
188 friend class content::CategorizedWorkerPool; | 187 friend class content::CategorizedWorkerPool; |
189 friend class remoting::AutoThread; | 188 friend class remoting::AutoThread; |
190 friend class ui::WindowResizeHelperMac; | 189 friend class ui::WindowResizeHelperMac; |
191 friend class MessagePumpDefault; | 190 friend class MessagePumpDefault; |
192 friend class SequencedWorkerPool; | 191 friend class SequencedWorkerPool; |
193 friend class SimpleThread; | |
194 friend class Thread; | 192 friend class Thread; |
195 friend class ThreadTestHelper; | 193 friend class ThreadTestHelper; |
196 friend class PlatformThread; | 194 friend class PlatformThread; |
197 friend class android::JavaHandlerThread; | 195 friend class android::JavaHandlerThread; |
198 friend class mojo::SyncCallRestrictions; | 196 friend class mojo::SyncCallRestrictions; |
199 friend class mojo::edk::ScopedIPCSupport; | 197 friend class mojo::edk::ScopedIPCSupport; |
200 friend class ui::CommandBufferClientImpl; | 198 friend class ui::CommandBufferClientImpl; |
201 friend class ui::CommandBufferLocal; | 199 friend class ui::CommandBufferLocal; |
202 friend class ui::GpuState; | 200 friend class ui::GpuState; |
203 | 201 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 | 244 |
247 DISALLOW_COPY_AND_ASSIGN(ScopedAllowWait); | 245 DISALLOW_COPY_AND_ASSIGN(ScopedAllowWait); |
248 }; | 246 }; |
249 | 247 |
250 DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadRestrictions); | 248 DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadRestrictions); |
251 }; | 249 }; |
252 | 250 |
253 } // namespace base | 251 } // namespace base |
254 | 252 |
255 #endif // BASE_THREADING_THREAD_RESTRICTIONS_H_ | 253 #endif // BASE_THREADING_THREAD_RESTRICTIONS_H_ |
OLD | NEW |