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->PostTaskAndReply( |
| 234 from_here, task, reply); |
| 235 } |
| 236 |
229 // static | 237 // static |
230 bool BrowserThread::PostBlockingPoolSequencedTask( | 238 bool BrowserThread::PostBlockingPoolSequencedTask( |
231 const std::string& sequence_token_name, | 239 const std::string& sequence_token_name, |
232 const tracked_objects::Location& from_here, | 240 const tracked_objects::Location& from_here, |
233 const base::Closure& task) { | 241 const base::Closure& task) { |
234 return g_globals.Get().blocking_pool->PostNamedSequencedWorkerTask( | 242 return g_globals.Get().blocking_pool->PostNamedSequencedWorkerTask( |
235 sequence_token_name, from_here, task); | 243 sequence_token_name, from_here, task); |
236 } | 244 } |
237 | 245 |
238 // static | 246 // static |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 AtomicWord* storage = reinterpret_cast<AtomicWord*>( | 412 AtomicWord* storage = reinterpret_cast<AtomicWord*>( |
405 &globals.thread_delegates[identifier]); | 413 &globals.thread_delegates[identifier]); |
406 AtomicWord old_pointer = base::subtle::NoBarrier_AtomicExchange( | 414 AtomicWord old_pointer = base::subtle::NoBarrier_AtomicExchange( |
407 storage, reinterpret_cast<AtomicWord>(delegate)); | 415 storage, reinterpret_cast<AtomicWord>(delegate)); |
408 | 416 |
409 // This catches registration when previously registered. | 417 // This catches registration when previously registered. |
410 DCHECK(!delegate || !old_pointer); | 418 DCHECK(!delegate || !old_pointer); |
411 } | 419 } |
412 | 420 |
413 } // namespace content | 421 } // namespace content |
OLD | NEW |