Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Side by Side Diff: content/browser/browser_thread_impl.cc

Issue 56833003: Use base::PostTaskAndReplyWithResults() in more places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, fix clang error Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « components/nacl/browser/nacl_process_host.cc ('k') | content/public/browser/browser_thread.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « components/nacl/browser/nacl_process_host.cc ('k') | content/public/browser/browser_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698