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" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
14 #include "base/message_loop_proxy.h" | 14 #include "base/message_loop/message_loop_proxy.h" |
15 #include "base/threading/sequenced_worker_pool.h" | 15 #include "base/threading/sequenced_worker_pool.h" |
16 #include "base/threading/thread_restrictions.h" | 16 #include "base/threading/thread_restrictions.h" |
17 #include "content/public/browser/browser_thread_delegate.h" | 17 #include "content/public/browser/browser_thread_delegate.h" |
18 | 18 |
19 namespace content { | 19 namespace content { |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 // Friendly names for the well-known threads. | 23 // Friendly names for the well-known threads. |
24 static const char* g_browser_thread_names[BrowserThread::ID_COUNT] = { | 24 static const char* g_browser_thread_names[BrowserThread::ID_COUNT] = { |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 AtomicWord* storage = reinterpret_cast<AtomicWord*>( | 477 AtomicWord* storage = reinterpret_cast<AtomicWord*>( |
478 &globals.thread_delegates[identifier]); | 478 &globals.thread_delegates[identifier]); |
479 AtomicWord old_pointer = base::subtle::NoBarrier_AtomicExchange( | 479 AtomicWord old_pointer = base::subtle::NoBarrier_AtomicExchange( |
480 storage, reinterpret_cast<AtomicWord>(delegate)); | 480 storage, reinterpret_cast<AtomicWord>(delegate)); |
481 | 481 |
482 // This catches registration when previously registered. | 482 // This catches registration when previously registered. |
483 DCHECK(!delegate || !old_pointer); | 483 DCHECK(!delegate || !old_pointer); |
484 } | 484 } |
485 | 485 |
486 } // namespace content | 486 } // namespace content |
OLD | NEW |