| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 } | 68 } |
| 69 | 69 |
| 70 namespace remoting { | 70 namespace remoting { |
| 71 class AutoThread; | 71 class AutoThread; |
| 72 } | 72 } |
| 73 | 73 |
| 74 namespace ui { | 74 namespace ui { |
| 75 class WindowResizeHelperMac; | 75 class WindowResizeHelperMac; |
| 76 } | 76 } |
| 77 | 77 |
| 78 namespace views { |
| 79 class WindowManagerConnection; |
| 80 } |
| 81 |
| 78 namespace base { | 82 namespace base { |
| 79 | 83 |
| 80 namespace android { | 84 namespace android { |
| 81 class JavaHandlerThread; | 85 class JavaHandlerThread; |
| 82 } | 86 } |
| 83 | 87 |
| 84 class SequencedWorkerPool; | 88 class SequencedWorkerPool; |
| 85 class SimpleThread; | 89 class SimpleThread; |
| 86 class Thread; | 90 class Thread; |
| 87 class ThreadTestHelper; | 91 class ThreadTestHelper; |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 friend class dbus::Bus; // http://crbug.com/125222 | 218 friend class dbus::Bus; // http://crbug.com/125222 |
| 215 friend class disk_cache::BackendImpl; // http://crbug.com/74623 | 219 friend class disk_cache::BackendImpl; // http://crbug.com/74623 |
| 216 friend class disk_cache::InFlightIO; // http://crbug.com/74623 | 220 friend class disk_cache::InFlightIO; // http://crbug.com/74623 |
| 217 friend class net::internal::AddressTrackerLinux; // http://crbug.com/125097 | 221 friend class net::internal::AddressTrackerLinux; // http://crbug.com/125097 |
| 218 friend class net::NetworkChangeNotifierMac; // http://crbug.com/125097 | 222 friend class net::NetworkChangeNotifierMac; // http://crbug.com/125097 |
| 219 friend class ::BrowserProcessImpl; // http://crbug.com/125207 | 223 friend class ::BrowserProcessImpl; // http://crbug.com/125207 |
| 220 friend class ::NativeBackendKWallet; // http://crbug.com/125331 | 224 friend class ::NativeBackendKWallet; // http://crbug.com/125331 |
| 221 #if !defined(OFFICIAL_BUILD) | 225 #if !defined(OFFICIAL_BUILD) |
| 222 friend class content::SoftwareOutputDeviceMus; // Interim non-production code | 226 friend class content::SoftwareOutputDeviceMus; // Interim non-production code |
| 223 #endif | 227 #endif |
| 228 friend class views::WindowManagerConnection; |
| 224 // END USAGE THAT NEEDS TO BE FIXED. | 229 // END USAGE THAT NEEDS TO BE FIXED. |
| 225 | 230 |
| 226 #if ENABLE_THREAD_RESTRICTIONS | 231 #if ENABLE_THREAD_RESTRICTIONS |
| 227 static bool SetWaitAllowed(bool allowed); | 232 static bool SetWaitAllowed(bool allowed); |
| 228 #else | 233 #else |
| 229 static bool SetWaitAllowed(bool allowed) { return true; } | 234 static bool SetWaitAllowed(bool allowed) { return true; } |
| 230 #endif | 235 #endif |
| 231 | 236 |
| 232 // Constructing a ScopedAllowWait temporarily allows waiting on the current | 237 // Constructing a ScopedAllowWait temporarily allows waiting on the current |
| 233 // thread. Doing this is almost always incorrect, which is why we limit who | 238 // thread. Doing this is almost always incorrect, which is why we limit who |
| (...skipping 10 matching lines...) Expand all Loading... |
| 244 | 249 |
| 245 DISALLOW_COPY_AND_ASSIGN(ScopedAllowWait); | 250 DISALLOW_COPY_AND_ASSIGN(ScopedAllowWait); |
| 246 }; | 251 }; |
| 247 | 252 |
| 248 DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadRestrictions); | 253 DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadRestrictions); |
| 249 }; | 254 }; |
| 250 | 255 |
| 251 } // namespace base | 256 } // namespace base |
| 252 | 257 |
| 253 #endif // BASE_THREADING_THREAD_RESTRICTIONS_H_ | 258 #endif // BASE_THREADING_THREAD_RESTRICTIONS_H_ |
| OLD | NEW |