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_PUBLIC_BROWSER_BROWSER_THREAD_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ |
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ | 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 const base::Closure& reply); | 179 const base::Closure& reply); |
180 static bool PostBlockingPoolSequencedTask( | 180 static bool PostBlockingPoolSequencedTask( |
181 const std::string& sequence_token_name, | 181 const std::string& sequence_token_name, |
182 const tracked_objects::Location& from_here, | 182 const tracked_objects::Location& from_here, |
183 const base::Closure& task); | 183 const base::Closure& task); |
184 | 184 |
185 // For use with scheduling non-critical tasks for execution after startup. | 185 // For use with scheduling non-critical tasks for execution after startup. |
186 // The order or execution of tasks posted here is unspecified even when | 186 // The order or execution of tasks posted here is unspecified even when |
187 // posting to a SequencedTaskRunner and tasks are not guaranteed to be run | 187 // posting to a SequencedTaskRunner and tasks are not guaranteed to be run |
188 // prior to browser shutdown. | 188 // prior to browser shutdown. |
| 189 // When called after the browser startup is complete, will post |task| |
| 190 // to |task_runner| immediately. |
189 // Note: see related ContentBrowserClient::PostAfterStartupTask. | 191 // Note: see related ContentBrowserClient::PostAfterStartupTask. |
190 static void PostAfterStartupTask( | 192 static void PostAfterStartupTask( |
191 const tracked_objects::Location& from_here, | 193 const tracked_objects::Location& from_here, |
192 const scoped_refptr<base::TaskRunner>& task_runner, | 194 const scoped_refptr<base::TaskRunner>& task_runner, |
193 const base::Closure& task); | 195 const base::Closure& task); |
194 | 196 |
195 // Returns the thread pool used for blocking file I/O. Use this object to | 197 // Returns the thread pool used for blocking file I/O. Use this object to |
196 // perform random blocking operations such as file writes or querying the | 198 // perform random blocking operations such as file writes or querying the |
197 // Windows registry. | 199 // Windows registry. |
198 static base::SequencedWorkerPool* GetBlockingPool() WARN_UNUSED_RESULT; | 200 static base::SequencedWorkerPool* GetBlockingPool() WARN_UNUSED_RESULT; |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 private: | 297 private: |
296 friend class BrowserThreadImpl; | 298 friend class BrowserThreadImpl; |
297 | 299 |
298 BrowserThread() {} | 300 BrowserThread() {} |
299 DISALLOW_COPY_AND_ASSIGN(BrowserThread); | 301 DISALLOW_COPY_AND_ASSIGN(BrowserThread); |
300 }; | 302 }; |
301 | 303 |
302 } // namespace content | 304 } // namespace content |
303 | 305 |
304 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ | 306 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ |
OLD | NEW |