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/basictypes.h" | 9 #include "base/basictypes.h" |
10 | 10 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 class AddressTrackerLinux; | 66 class AddressTrackerLinux; |
67 } | 67 } |
68 } | 68 } |
69 | 69 |
70 namespace remoting { | 70 namespace remoting { |
71 class AutoThread; | 71 class AutoThread; |
72 } | 72 } |
73 | 73 |
74 namespace base { | 74 namespace base { |
75 | 75 |
| 76 namespace android { |
| 77 class JavaHandlerThread; |
| 78 } |
| 79 |
76 class SequencedWorkerPool; | 80 class SequencedWorkerPool; |
77 class SimpleThread; | 81 class SimpleThread; |
78 class Thread; | 82 class Thread; |
79 class ThreadTestHelper; | 83 class ThreadTestHelper; |
80 | 84 |
81 // Certain behavior is disallowed on certain threads. ThreadRestrictions helps | 85 // Certain behavior is disallowed on certain threads. ThreadRestrictions helps |
82 // enforce these rules. Examples of such rules: | 86 // enforce these rules. Examples of such rules: |
83 // | 87 // |
84 // * Do not do blocking IO (makes the thread janky) | 88 // * Do not do blocking IO (makes the thread janky) |
85 // * Do not access Singleton/LazyInstance (may lead to shutdown crashes) | 89 // * Do not access Singleton/LazyInstance (may lead to shutdown crashes) |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 friend class ::ScopedAllowWaitForLegacyWebViewApi; | 182 friend class ::ScopedAllowWaitForLegacyWebViewApi; |
179 friend class ::TestingAutomationProvider; | 183 friend class ::TestingAutomationProvider; |
180 friend class cc::CompletionEvent; | 184 friend class cc::CompletionEvent; |
181 friend class remoting::AutoThread; | 185 friend class remoting::AutoThread; |
182 friend class MessagePumpDefault; | 186 friend class MessagePumpDefault; |
183 friend class SequencedWorkerPool; | 187 friend class SequencedWorkerPool; |
184 friend class SimpleThread; | 188 friend class SimpleThread; |
185 friend class Thread; | 189 friend class Thread; |
186 friend class ThreadTestHelper; | 190 friend class ThreadTestHelper; |
187 friend class PlatformThread; | 191 friend class PlatformThread; |
| 192 friend class android::JavaHandlerThread; |
188 | 193 |
189 // END ALLOWED USAGE. | 194 // END ALLOWED USAGE. |
190 // BEGIN USAGE THAT NEEDS TO BE FIXED. | 195 // BEGIN USAGE THAT NEEDS TO BE FIXED. |
191 friend class ::chromeos::AudioMixerAlsa; // http://crbug.com/125206 | 196 friend class ::chromeos::AudioMixerAlsa; // http://crbug.com/125206 |
192 friend class ::chromeos::BlockingMethodCaller; // http://crbug.com/125360 | 197 friend class ::chromeos::BlockingMethodCaller; // http://crbug.com/125360 |
193 friend class ::chromeos::system::StatisticsProviderImpl; // http://crbug.com/
125385 | 198 friend class ::chromeos::system::StatisticsProviderImpl; // http://crbug.com/
125385 |
194 friend class browser_sync::NonFrontendDataTypeController; // http://crbug.com
/19757 | 199 friend class browser_sync::NonFrontendDataTypeController; // http://crbug.com
/19757 |
195 friend class browser_sync::UIModelWorker; // http://crbug.com/19757 | 200 friend class browser_sync::UIModelWorker; // http://crbug.com/19757 |
196 friend class chrome_browser_net::Predictor; // http://crbug.com/78451 | 201 friend class chrome_browser_net::Predictor; // http://crbug.com/78451 |
197 friend class | 202 friend class |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 | 238 |
234 DISALLOW_COPY_AND_ASSIGN(ScopedAllowWait); | 239 DISALLOW_COPY_AND_ASSIGN(ScopedAllowWait); |
235 }; | 240 }; |
236 | 241 |
237 DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadRestrictions); | 242 DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadRestrictions); |
238 }; | 243 }; |
239 | 244 |
240 } // namespace base | 245 } // namespace base |
241 | 246 |
242 #endif // BASE_THREADING_THREAD_RESTRICTIONS_H_ | 247 #endif // BASE_THREADING_THREAD_RESTRICTIONS_H_ |
OLD | NEW |