| 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/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 static bool PostBlockingPoolSequencedTask( | 172 static bool PostBlockingPoolSequencedTask( |
| 173 const std::string& sequence_token_name, | 173 const std::string& sequence_token_name, |
| 174 const tracked_objects::Location& from_here, | 174 const tracked_objects::Location& from_here, |
| 175 const base::Closure& task); | 175 const base::Closure& task); |
| 176 | 176 |
| 177 // Returns the thread pool used for blocking file I/O. Use this object to | 177 // Returns the thread pool used for blocking file I/O. Use this object to |
| 178 // perform random blocking operations such as file writes or querying the | 178 // perform random blocking operations such as file writes or querying the |
| 179 // Windows registry. | 179 // Windows registry. |
| 180 static base::SequencedWorkerPool* GetBlockingPool(); | 180 static base::SequencedWorkerPool* GetBlockingPool(); |
| 181 | 181 |
| 182 // Callable on any thread. Returns whether the given ID corresponds to a well | 182 // Callable on any thread. Returns whether the given well-known thread has |
| 183 // known thread. | 183 // been initialized. |
| 184 static bool IsWellKnownThread(ID identifier); | 184 static bool IsThreadInitialized(ID identifier); |
| 185 | 185 |
| 186 // Callable on any thread. Returns whether you're currently on a particular | 186 // Callable on any thread. Returns whether you're currently on a particular |
| 187 // thread. | 187 // thread. |
| 188 static bool CurrentlyOn(ID identifier); | 188 static bool CurrentlyOn(ID identifier); |
| 189 | 189 |
| 190 // Callable on any thread. Returns whether the threads message loop is valid. | 190 // Callable on any thread. Returns whether the threads message loop is valid. |
| 191 // If this returns false it means the thread is in the process of shutting | 191 // If this returns false it means the thread is in the process of shutting |
| 192 // down. | 192 // down. |
| 193 static bool IsMessageLoopValid(ID identifier); | 193 static bool IsMessageLoopValid(ID identifier); |
| 194 | 194 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 private: | 265 private: |
| 266 friend class BrowserThreadImpl; | 266 friend class BrowserThreadImpl; |
| 267 | 267 |
| 268 BrowserThread() {} | 268 BrowserThread() {} |
| 269 DISALLOW_COPY_AND_ASSIGN(BrowserThread); | 269 DISALLOW_COPY_AND_ASSIGN(BrowserThread); |
| 270 }; | 270 }; |
| 271 | 271 |
| 272 } // namespace content | 272 } // namespace content |
| 273 | 273 |
| 274 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ | 274 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_THREAD_H_ |
| OLD | NEW |