Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Side by Side Diff: base/threading/thread_restrictions.h

Issue 2554123002: Support parallel captures from the StackSamplingProfiler. (Closed)
Patch Set: rebased Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/profiler/stack_sampling_profiler_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 namespace android { 92 namespace android {
93 class JavaHandlerThread; 93 class JavaHandlerThread;
94 } 94 }
95 95
96 namespace internal { 96 namespace internal {
97 class TaskTracker; 97 class TaskTracker;
98 } 98 }
99 99
100 class SequencedWorkerPool; 100 class SequencedWorkerPool;
101 class SimpleThread; 101 class SimpleThread;
102 class StackSamplingProfiler;
102 class Thread; 103 class Thread;
103 class ThreadTestHelper; 104 class ThreadTestHelper;
104 105
105 // Certain behavior is disallowed on certain threads. ThreadRestrictions helps 106 // Certain behavior is disallowed on certain threads. ThreadRestrictions helps
106 // enforce these rules. Examples of such rules: 107 // enforce these rules. Examples of such rules:
107 // 108 //
108 // * Do not do blocking IO (makes the thread janky) 109 // * Do not do blocking IO (makes the thread janky)
109 // * Do not access Singleton/LazyInstance (may lead to shutdown crashes) 110 // * Do not access Singleton/LazyInstance (may lead to shutdown crashes)
110 // 111 //
111 // Here's more about how the protection works: 112 // Here's more about how the protection works:
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 static void AssertSingletonAllowed() {} 177 static void AssertSingletonAllowed() {}
177 static void DisallowWaiting() {} 178 static void DisallowWaiting() {}
178 static void AssertWaitAllowed() {} 179 static void AssertWaitAllowed() {}
179 #endif 180 #endif
180 181
181 private: 182 private:
182 // DO NOT ADD ANY OTHER FRIEND STATEMENTS, talk to jam or brettw first. 183 // DO NOT ADD ANY OTHER FRIEND STATEMENTS, talk to jam or brettw first.
183 // BEGIN ALLOWED USAGE. 184 // BEGIN ALLOWED USAGE.
184 friend class android_webview::AwFormDatabaseService; 185 friend class android_webview::AwFormDatabaseService;
185 friend class android_webview::CookieManager; 186 friend class android_webview::CookieManager;
187 friend class base::StackSamplingProfiler;
186 friend class content::BrowserShutdownProfileDumper; 188 friend class content::BrowserShutdownProfileDumper;
187 friend class content::BrowserSurfaceViewManager; 189 friend class content::BrowserSurfaceViewManager;
188 friend class content::BrowserTestBase; 190 friend class content::BrowserTestBase;
189 friend class content::NestedMessagePumpAndroid; 191 friend class content::NestedMessagePumpAndroid;
190 friend class content::ScopedAllowWaitForAndroidLayoutTests; 192 friend class content::ScopedAllowWaitForAndroidLayoutTests;
191 friend class content::ScopedAllowWaitForDebugURL; 193 friend class content::ScopedAllowWaitForDebugURL;
192 friend class content::SynchronousCompositor; 194 friend class content::SynchronousCompositor;
193 friend class content::SynchronousCompositorBrowserFilter; 195 friend class content::SynchronousCompositorBrowserFilter;
194 friend class content::SynchronousCompositorHost; 196 friend class content::SynchronousCompositorHost;
195 friend class ::HistogramSynchronizer; 197 friend class ::HistogramSynchronizer;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 259
258 DISALLOW_COPY_AND_ASSIGN(ScopedAllowWait); 260 DISALLOW_COPY_AND_ASSIGN(ScopedAllowWait);
259 }; 261 };
260 262
261 DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadRestrictions); 263 DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadRestrictions);
262 }; 264 };
263 265
264 } // namespace base 266 } // namespace base
265 267
266 #endif // BASE_THREADING_THREAD_RESTRICTIONS_H_ 268 #endif // BASE_THREADING_THREAD_RESTRICTIONS_H_
OLDNEW
« no previous file with comments | « base/profiler/stack_sampling_profiler_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698