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 CONTENT_BROWSER_BROWSER_THREAD_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_BROWSER_THREAD_IMPL_H_ |
6 #define CONTENT_BROWSER_BROWSER_THREAD_IMPL_H_ | 6 #define CONTENT_BROWSER_BROWSER_THREAD_IMPL_H_ |
7 | 7 |
8 #include "base/threading/platform_thread.h" | 8 #include "base/threading/platform_thread.h" |
9 #include "base/threading/thread.h" | 9 #include "base/threading/thread.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // The following are unique function names that makes it possible to tell | 46 // The following are unique function names that makes it possible to tell |
47 // the thread id from the callstack alone in crash dumps. | 47 // the thread id from the callstack alone in crash dumps. |
48 void UIThreadRun(base::RunLoop* run_loop); | 48 void UIThreadRun(base::RunLoop* run_loop); |
49 void DBThreadRun(base::RunLoop* run_loop); | 49 void DBThreadRun(base::RunLoop* run_loop); |
50 void FileThreadRun(base::RunLoop* run_loop); | 50 void FileThreadRun(base::RunLoop* run_loop); |
51 void FileUserBlockingThreadRun(base::RunLoop* run_loop); | 51 void FileUserBlockingThreadRun(base::RunLoop* run_loop); |
52 void ProcessLauncherThreadRun(base::RunLoop* run_loop); | 52 void ProcessLauncherThreadRun(base::RunLoop* run_loop); |
53 void CacheThreadRun(base::RunLoop* run_loop); | 53 void CacheThreadRun(base::RunLoop* run_loop); |
54 void IOThreadRun(base::RunLoop* run_loop); | 54 void IOThreadRun(base::RunLoop* run_loop); |
55 | 55 |
56 static bool PostTaskHelper( | 56 static bool PostTaskHelper(BrowserThread::ID identifier, |
57 BrowserThread::ID identifier, | 57 const tracked_objects::Location& from_here, |
58 const tracked_objects::Location& from_here, | 58 base::OnceClosure task, |
59 const base::Closure& task, | 59 base::TimeDelta delay, |
60 base::TimeDelta delay, | 60 bool nestable); |
61 bool nestable); | |
62 | 61 |
63 // Common initialization code for the constructors. | 62 // Common initialization code for the constructors. |
64 void Initialize(); | 63 void Initialize(); |
65 | 64 |
66 // For testing. | 65 // For testing. |
67 friend class ContentTestSuiteBaseListener; | 66 friend class ContentTestSuiteBaseListener; |
68 friend class TestBrowserThreadBundle; | 67 friend class TestBrowserThreadBundle; |
69 static void FlushThreadPoolHelperForTesting(); | 68 static void FlushThreadPoolHelperForTesting(); |
70 | 69 |
71 // The identifier of this thread. Only one thread can exist with a given | 70 // The identifier of this thread. Only one thread can exist with a given |
72 // identifier at a given time. | 71 // identifier at a given time. |
73 ID identifier_; | 72 ID identifier_; |
74 }; | 73 }; |
75 | 74 |
76 } // namespace content | 75 } // namespace content |
77 | 76 |
78 #endif // CONTENT_BROWSER_BROWSER_THREAD_IMPL_H_ | 77 #endif // CONTENT_BROWSER_BROWSER_THREAD_IMPL_H_ |
OLD | NEW |