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