| OLD | NEW |
| 1 // Copyright (c) 2011 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 class BrowserProcessImpl; | 11 class BrowserProcessImpl; |
| 12 class MetricsService; | 12 class MetricsService; |
| 13 class RenderWidgetHelper; | 13 class RenderWidgetHelper; |
| 14 class TestingAutomationProvider; | 14 class TestingAutomationProvider; |
| 15 class TextInputClientMac; | 15 class TextInputClientMac; |
| 16 class NativeBackendKWallet; |
| 17 |
| 16 namespace browser_sync { | 18 namespace browser_sync { |
| 17 class NonFrontendDataTypeController; | 19 class NonFrontendDataTypeController; |
| 18 class UIModelWorker; | 20 class UIModelWorker; |
| 19 } | 21 } |
| 20 namespace chromeos { | 22 namespace chromeos { |
| 21 class AudioMixerAlsa; | 23 class AudioMixerAlsa; |
| 22 } | 24 } |
| 23 namespace chrome_browser_net { | 25 namespace chrome_browser_net { |
| 24 class Predictor; | 26 class Predictor; |
| 25 } | 27 } |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 friend class disk_cache::BackendImpl; // http://crbug.com/74623 | 163 friend class disk_cache::BackendImpl; // http://crbug.com/74623 |
| 162 friend class disk_cache::InFlightIO; // http://crbug.com/74623 | 164 friend class disk_cache::InFlightIO; // http://crbug.com/74623 |
| 163 friend class gdata::GDataFileSystem; // http://crbug.com/125220 | 165 friend class gdata::GDataFileSystem; // http://crbug.com/125220 |
| 164 friend class media::AudioOutputController; // http://crbug.com/120973 | 166 friend class media::AudioOutputController; // http://crbug.com/120973 |
| 165 friend class net::FileStreamPosix; // http://crbug.com/115067 | 167 friend class net::FileStreamPosix; // http://crbug.com/115067 |
| 166 friend class net::FileStreamWin; // http://crbug.com/115067 | 168 friend class net::FileStreamWin; // http://crbug.com/115067 |
| 167 friend class net::NetworkManagerApi; // http://crbug.com/125097 | 169 friend class net::NetworkManagerApi; // http://crbug.com/125097 |
| 168 friend class ::BrowserProcessImpl; // http://crbug.com/125207 | 170 friend class ::BrowserProcessImpl; // http://crbug.com/125207 |
| 169 friend class ::MetricsService; // http://crbug.com/124954 | 171 friend class ::MetricsService; // http://crbug.com/124954 |
| 170 friend class ::TextInputClientMac; // http://crbug.com/121917 | 172 friend class ::TextInputClientMac; // http://crbug.com/121917 |
| 173 friend class ::NativeBackendKWallet; // http://crbug.com/125331 |
| 171 // END USAGE THAT NEEDS TO BE FIXED. | 174 // END USAGE THAT NEEDS TO BE FIXED. |
| 172 | 175 |
| 173 #if !defined(OFFICIAL_BUILD) | 176 #if !defined(OFFICIAL_BUILD) |
| 174 static bool SetWaitAllowed(bool allowed); | 177 static bool SetWaitAllowed(bool allowed); |
| 175 #else | 178 #else |
| 176 static bool SetWaitAllowed(bool allowed) { return true; } | 179 static bool SetWaitAllowed(bool allowed) { return true; } |
| 177 #endif | 180 #endif |
| 178 | 181 |
| 179 // Constructing a ScopedAllowWait temporarily allows waiting on the current | 182 // Constructing a ScopedAllowWait temporarily allows waiting on the current |
| 180 // thread. Doing this is almost always incorrect, which is why we limit who | 183 // thread. Doing this is almost always incorrect, which is why we limit who |
| (...skipping 10 matching lines...) Expand all Loading... |
| 191 | 194 |
| 192 DISALLOW_COPY_AND_ASSIGN(ScopedAllowWait); | 195 DISALLOW_COPY_AND_ASSIGN(ScopedAllowWait); |
| 193 }; | 196 }; |
| 194 | 197 |
| 195 DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadRestrictions); | 198 DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadRestrictions); |
| 196 }; | 199 }; |
| 197 | 200 |
| 198 } // namespace base | 201 } // namespace base |
| 199 | 202 |
| 200 #endif // BASE_THREADING_THREAD_RESTRICTIONS_H_ | 203 #endif // BASE_THREADING_THREAD_RESTRICTIONS_H_ |
| OLD | NEW |