OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This interface is for managing the global services of the application. Each | 5 // This interface is for managing the global services of the application. Each |
6 // service is lazily created when requested the first time. The service getters | 6 // service is lazily created when requested the first time. The service getters |
7 // will return NULL if the service is not available, so callers must check for | 7 // will return NULL if the service is not available, so callers must check for |
8 // this condition. | 8 // this condition. |
9 | 9 |
10 #ifndef CHROME_BROWSER_BROWSER_PROCESS_H_ | 10 #ifndef CHROME_BROWSER_BROWSER_PROCESS_H_ |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
117 | 117 |
118 // Returns the thread that we perform I/O coordination on (network requests, | 118 // Returns the thread that we perform I/O coordination on (network requests, |
119 // communication with renderers, etc. | 119 // communication with renderers, etc. |
120 // NOTE: You should ONLY use this to pass to IPC or other objects which must | 120 // NOTE: You should ONLY use this to pass to IPC or other objects which must |
121 // need a MessageLoop*. If you just want to post a task, use | 121 // need a MessageLoop*. If you just want to post a task, use |
122 // BrowserThread::PostTask (or other variants) as they take care of checking | 122 // BrowserThread::PostTask (or other variants) as they take care of checking |
123 // that a thread is still alive, race conditions, lifetime differences etc. | 123 // that a thread is still alive, race conditions, lifetime differences etc. |
124 // If you still must use this check the return value for NULL. | 124 // If you still must use this check the return value for NULL. |
125 virtual IOThread* io_thread() = 0; | 125 virtual IOThread* io_thread() = 0; |
126 | 126 |
127 // Returns the thread used for file system operations that block user | |
128 // interactions. Responsiveness of this thread affect users. | |
129 virtual base::Thread* file_user_blocking_thread() = 0; | |
jam
2011/11/29 17:31:09
Joi is actually planning on removing the base::Thr
michaeln
2011/11/29 21:05:28
Done.
| |
130 | |
127 // Returns the thread that we perform random file operations on. For code | 131 // Returns the thread that we perform random file operations on. For code |
128 // that wants to do I/O operations (not network requests or even file: URL | 132 // that wants to do I/O operations (not network requests or even file: URL |
129 // requests), this is the thread to use to avoid blocking the UI thread. | 133 // requests), this is the thread to use to avoid blocking the UI thread. |
130 // It might be nicer to have a thread pool for this kind of thing. | 134 // It might be nicer to have a thread pool for this kind of thing. |
131 virtual base::Thread* file_thread() = 0; | 135 virtual base::Thread* file_thread() = 0; |
132 | 136 |
133 // Returns the thread that is used for database operations such as the web | 137 // Returns the thread that is used for database operations such as the web |
134 // database. History has its own thread since it has much higher traffic. | 138 // database. History has its own thread since it has much higher traffic. |
135 virtual base::Thread* db_thread() = 0; | 139 virtual base::Thread* db_thread() = 0; |
136 | 140 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
228 | 232 |
229 virtual CRLSetFetcher* crl_set_fetcher() = 0; | 233 virtual CRLSetFetcher* crl_set_fetcher() = 0; |
230 | 234 |
231 private: | 235 private: |
232 DISALLOW_COPY_AND_ASSIGN(BrowserProcess); | 236 DISALLOW_COPY_AND_ASSIGN(BrowserProcess); |
233 }; | 237 }; |
234 | 238 |
235 extern BrowserProcess* g_browser_process; | 239 extern BrowserProcess* g_browser_process; |
236 | 240 |
237 #endif // CHROME_BROWSER_BROWSER_PROCESS_H_ | 241 #endif // CHROME_BROWSER_BROWSER_PROCESS_H_ |
OLD | NEW |