| 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 |
| 11 // See comment at top of thread_checker.h | 11 // See comment at top of thread_checker.h |
| 12 #if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) | 12 #if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) |
| 13 #define ENABLE_THREAD_RESTRICTIONS 1 | 13 #define ENABLE_THREAD_RESTRICTIONS 1 |
| 14 #else | 14 #else |
| 15 #define ENABLE_THREAD_RESTRICTIONS 0 | 15 #define ENABLE_THREAD_RESTRICTIONS 0 |
| 16 #endif | 16 #endif |
| 17 | 17 |
| 18 class AcceleratedPresenter; | 18 class AcceleratedPresenter; |
| 19 class BrowserProcessImpl; | 19 class BrowserProcessImpl; |
| 20 class HistogramSynchronizer; | 20 class HistogramSynchronizer; |
| 21 class GpuChannelHost; | 21 class GpuChannelHost; |
| 22 class MetricsService; | 22 class MetricsService; |
| 23 class NativeBackendKWallet; | 23 class NativeBackendKWallet; |
| 24 class ScopedAllowWaitForLegacyWebViewApi; |
| 24 class TestingAutomationProvider; | 25 class TestingAutomationProvider; |
| 25 class TextInputClientMac; | 26 class TextInputClientMac; |
| 26 | 27 |
| 27 namespace browser_sync { | 28 namespace browser_sync { |
| 28 class NonFrontendDataTypeController; | 29 class NonFrontendDataTypeController; |
| 29 class UIModelWorker; | 30 class UIModelWorker; |
| 30 } | 31 } |
| 31 namespace chromeos { | 32 namespace chromeos { |
| 32 class AudioMixerAlsa; | 33 class AudioMixerAlsa; |
| 33 class BlockingMethodCaller; | 34 class BlockingMethodCaller; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 static void AssertSingletonAllowed() {} | 155 static void AssertSingletonAllowed() {} |
| 155 static void DisallowWaiting() {} | 156 static void DisallowWaiting() {} |
| 156 static void AssertWaitAllowed() {} | 157 static void AssertWaitAllowed() {} |
| 157 #endif | 158 #endif |
| 158 | 159 |
| 159 private: | 160 private: |
| 160 // DO NOT ADD ANY OTHER FRIEND STATEMENTS, talk to jam or brettw first. | 161 // DO NOT ADD ANY OTHER FRIEND STATEMENTS, talk to jam or brettw first. |
| 161 // BEGIN ALLOWED USAGE. | 162 // BEGIN ALLOWED USAGE. |
| 162 friend class content::RenderWidgetHelper; | 163 friend class content::RenderWidgetHelper; |
| 163 friend class ::HistogramSynchronizer; | 164 friend class ::HistogramSynchronizer; |
| 165 friend class ::ScopedAllowWaitForLegacyWebViewApi; |
| 164 friend class ::TestingAutomationProvider; | 166 friend class ::TestingAutomationProvider; |
| 165 friend class SequencedWorkerPool; | 167 friend class SequencedWorkerPool; |
| 166 friend class SimpleThread; | 168 friend class SimpleThread; |
| 167 friend class Thread; | 169 friend class Thread; |
| 168 friend class ThreadTestHelper; | 170 friend class ThreadTestHelper; |
| 169 // END ALLOWED USAGE. | 171 // END ALLOWED USAGE. |
| 170 // BEGIN USAGE THAT NEEDS TO BE FIXED. | 172 // BEGIN USAGE THAT NEEDS TO BE FIXED. |
| 171 friend class ::chromeos::AudioMixerAlsa; // http://crbug.com/125206 | 173 friend class ::chromeos::AudioMixerAlsa; // http://crbug.com/125206 |
| 172 friend class ::chromeos::BlockingMethodCaller; // http://crbug.com/125360 | 174 friend class ::chromeos::BlockingMethodCaller; // http://crbug.com/125360 |
| 173 friend class ::chromeos::system::StatisticsProviderImpl; // http://crbug.com/
125385 | 175 friend class ::chromeos::system::StatisticsProviderImpl; // http://crbug.com/
125385 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 | 215 |
| 214 DISALLOW_COPY_AND_ASSIGN(ScopedAllowWait); | 216 DISALLOW_COPY_AND_ASSIGN(ScopedAllowWait); |
| 215 }; | 217 }; |
| 216 | 218 |
| 217 DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadRestrictions); | 219 DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadRestrictions); |
| 218 }; | 220 }; |
| 219 | 221 |
| 220 } // namespace base | 222 } // namespace base |
| 221 | 223 |
| 222 #endif // BASE_THREADING_THREAD_RESTRICTIONS_H_ | 224 #endif // BASE_THREADING_THREAD_RESTRICTIONS_H_ |
| OLD | NEW |