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 #include "content/browser/browser_thread_impl.h" | 5 #include "content/browser/browser_thread_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/atomicops.h" | 9 #include "base/atomicops.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
219 DISALLOW_COPY_AND_ASSIGN(BrowserThreadMessageLoopProxy); | 219 DISALLOW_COPY_AND_ASSIGN(BrowserThreadMessageLoopProxy); |
220 }; | 220 }; |
221 | 221 |
222 // static | 222 // static |
223 bool BrowserThread::PostBlockingPoolTask( | 223 bool BrowserThread::PostBlockingPoolTask( |
224 const tracked_objects::Location& from_here, | 224 const tracked_objects::Location& from_here, |
225 const base::Closure& task) { | 225 const base::Closure& task) { |
226 return g_globals.Get().blocking_pool->PostWorkerTask(from_here, task); | 226 return g_globals.Get().blocking_pool->PostWorkerTask(from_here, task); |
227 } | 227 } |
228 | 228 |
229 bool BrowserThread::PostBlockingPoolTaskAndReply( | |
230 const tracked_objects::Location& from_here, | |
231 const base::Closure& task, | |
232 const base::Closure& reply) { | |
233 return g_globals.Get().blocking_pool->PostWorkerTask(from_here, task); | |
jam
2012/04/05 17:46:53
did you mean to call PostTaskAndReply?
willchan no longer on Chromium
2012/04/06 16:28:44
Thank you for actually reading my code :)
| |
234 } | |
235 | |
229 // static | 236 // static |
230 bool BrowserThread::PostBlockingPoolSequencedTask( | 237 bool BrowserThread::PostBlockingPoolSequencedTask( |
231 const std::string& sequence_token_name, | 238 const std::string& sequence_token_name, |
232 const tracked_objects::Location& from_here, | 239 const tracked_objects::Location& from_here, |
233 const base::Closure& task) { | 240 const base::Closure& task) { |
234 return g_globals.Get().blocking_pool->PostNamedSequencedWorkerTask( | 241 return g_globals.Get().blocking_pool->PostNamedSequencedWorkerTask( |
235 sequence_token_name, from_here, task); | 242 sequence_token_name, from_here, task); |
236 } | 243 } |
237 | 244 |
238 // static | 245 // static |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
404 AtomicWord* storage = reinterpret_cast<AtomicWord*>( | 411 AtomicWord* storage = reinterpret_cast<AtomicWord*>( |
405 &globals.thread_delegates[identifier]); | 412 &globals.thread_delegates[identifier]); |
406 AtomicWord old_pointer = base::subtle::NoBarrier_AtomicExchange( | 413 AtomicWord old_pointer = base::subtle::NoBarrier_AtomicExchange( |
407 storage, reinterpret_cast<AtomicWord>(delegate)); | 414 storage, reinterpret_cast<AtomicWord>(delegate)); |
408 | 415 |
409 // This catches registration when previously registered. | 416 // This catches registration when previously registered. |
410 DCHECK(!delegate || !old_pointer); | 417 DCHECK(!delegate || !old_pointer); |
411 } | 418 } |
412 | 419 |
413 } // namespace content | 420 } // namespace content |
OLD | NEW |