| 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 DISALLOW_COPY_AND_ASSIGN(BrowserThreadMessageLoopProxy); | 309 DISALLOW_COPY_AND_ASSIGN(BrowserThreadMessageLoopProxy); |
| 310 }; | 310 }; |
| 311 | 311 |
| 312 // static | 312 // static |
| 313 bool BrowserThread::PostBlockingPoolTask( | 313 bool BrowserThread::PostBlockingPoolTask( |
| 314 const tracked_objects::Location& from_here, | 314 const tracked_objects::Location& from_here, |
| 315 const base::Closure& task) { | 315 const base::Closure& task) { |
| 316 return g_globals.Get().blocking_pool->PostWorkerTask(from_here, task); | 316 return g_globals.Get().blocking_pool->PostWorkerTask(from_here, task); |
| 317 } | 317 } |
| 318 | 318 |
| 319 // static |
| 319 bool BrowserThread::PostBlockingPoolTaskAndReply( | 320 bool BrowserThread::PostBlockingPoolTaskAndReply( |
| 320 const tracked_objects::Location& from_here, | 321 const tracked_objects::Location& from_here, |
| 321 const base::Closure& task, | 322 const base::Closure& task, |
| 322 const base::Closure& reply) { | 323 const base::Closure& reply) { |
| 323 return g_globals.Get().blocking_pool->PostTaskAndReply( | 324 return g_globals.Get().blocking_pool->PostTaskAndReply( |
| 324 from_here, task, reply); | 325 from_here, task, reply); |
| 325 } | 326 } |
| 326 | 327 |
| 327 // static | 328 // static |
| 328 bool BrowserThread::PostBlockingPoolSequencedTask( | 329 bool BrowserThread::PostBlockingPoolSequencedTask( |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 AtomicWord* storage = reinterpret_cast<AtomicWord*>( | 474 AtomicWord* storage = reinterpret_cast<AtomicWord*>( |
| 474 &globals.thread_delegates[identifier]); | 475 &globals.thread_delegates[identifier]); |
| 475 AtomicWord old_pointer = base::subtle::NoBarrier_AtomicExchange( | 476 AtomicWord old_pointer = base::subtle::NoBarrier_AtomicExchange( |
| 476 storage, reinterpret_cast<AtomicWord>(delegate)); | 477 storage, reinterpret_cast<AtomicWord>(delegate)); |
| 477 | 478 |
| 478 // This catches registration when previously registered. | 479 // This catches registration when previously registered. |
| 479 DCHECK(!delegate || !old_pointer); | 480 DCHECK(!delegate || !old_pointer); |
| 480 } | 481 } |
| 481 | 482 |
| 482 } // namespace content | 483 } // namespace content |
| OLD | NEW |