| 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/macros.h" | 9 #include "base/macros.h" |
| 10 | 10 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 76 |
| 77 namespace remoting { | 77 namespace remoting { |
| 78 class AutoThread; | 78 class AutoThread; |
| 79 } | 79 } |
| 80 | 80 |
| 81 namespace ui { | 81 namespace ui { |
| 82 class WindowResizeHelperMac; | 82 class WindowResizeHelperMac; |
| 83 } | 83 } |
| 84 | 84 |
| 85 namespace views { | 85 namespace views { |
| 86 class ClipboardMus; | |
| 87 class ScreenMus; | 86 class ScreenMus; |
| 88 } | 87 } |
| 89 | 88 |
| 90 namespace base { | 89 namespace base { |
| 91 | 90 |
| 92 namespace android { | 91 namespace android { |
| 93 class JavaHandlerThread; | 92 class JavaHandlerThread; |
| 94 } | 93 } |
| 95 | 94 |
| 96 class SequencedWorkerPool; | 95 class SequencedWorkerPool; |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 friend class disk_cache::BackendImpl; // http://crbug.com/74623 | 230 friend class disk_cache::BackendImpl; // http://crbug.com/74623 |
| 232 friend class disk_cache::InFlightIO; // http://crbug.com/74623 | 231 friend class disk_cache::InFlightIO; // http://crbug.com/74623 |
| 233 friend class gpu::GpuChannelHost; // http://crbug.com/125264 | 232 friend class gpu::GpuChannelHost; // http://crbug.com/125264 |
| 234 friend class net::internal::AddressTrackerLinux; // http://crbug.com/125097 | 233 friend class net::internal::AddressTrackerLinux; // http://crbug.com/125097 |
| 235 friend class net::NetworkChangeNotifierMac; // http://crbug.com/125097 | 234 friend class net::NetworkChangeNotifierMac; // http://crbug.com/125097 |
| 236 friend class ::BrowserProcessImpl; // http://crbug.com/125207 | 235 friend class ::BrowserProcessImpl; // http://crbug.com/125207 |
| 237 friend class ::NativeBackendKWallet; // http://crbug.com/125331 | 236 friend class ::NativeBackendKWallet; // http://crbug.com/125331 |
| 238 #if !defined(OFFICIAL_BUILD) | 237 #if !defined(OFFICIAL_BUILD) |
| 239 friend class content::SoftwareOutputDeviceMus; // Interim non-production code | 238 friend class content::SoftwareOutputDeviceMus; // Interim non-production code |
| 240 #endif | 239 #endif |
| 241 // In the non-mus case, we called blocking OS functions in the ui::Clipboard | |
| 242 // implementation which weren't caught by threading restrictions. Our | |
| 243 // blocking calls to mus, however, are. | |
| 244 friend class views::ClipboardMus; | |
| 245 friend class views::ScreenMus; | 240 friend class views::ScreenMus; |
| 246 // END USAGE THAT NEEDS TO BE FIXED. | 241 // END USAGE THAT NEEDS TO BE FIXED. |
| 247 | 242 |
| 248 #if ENABLE_THREAD_RESTRICTIONS | 243 #if ENABLE_THREAD_RESTRICTIONS |
| 249 static bool SetWaitAllowed(bool allowed); | 244 static bool SetWaitAllowed(bool allowed); |
| 250 #else | 245 #else |
| 251 static bool SetWaitAllowed(bool allowed) { return true; } | 246 static bool SetWaitAllowed(bool allowed) { return true; } |
| 252 #endif | 247 #endif |
| 253 | 248 |
| 254 // Constructing a ScopedAllowWait temporarily allows waiting on the current | 249 // Constructing a ScopedAllowWait temporarily allows waiting on the current |
| (...skipping 11 matching lines...) Expand all Loading... |
| 266 | 261 |
| 267 DISALLOW_COPY_AND_ASSIGN(ScopedAllowWait); | 262 DISALLOW_COPY_AND_ASSIGN(ScopedAllowWait); |
| 268 }; | 263 }; |
| 269 | 264 |
| 270 DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadRestrictions); | 265 DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadRestrictions); |
| 271 }; | 266 }; |
| 272 | 267 |
| 273 } // namespace base | 268 } // namespace base |
| 274 | 269 |
| 275 #endif // BASE_THREADING_THREAD_RESTRICTIONS_H_ | 270 #endif // BASE_THREADING_THREAD_RESTRICTIONS_H_ |
| OLD | NEW |