| 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.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 #if defined(OS_ANDROID) | 24 #if defined(OS_ANDROID) |
| 25 #include "base/android/jni_android.h" | 25 #include "base/android/jni_android.h" |
| 26 #endif | 26 #endif |
| 27 | 27 |
| 28 namespace content { | 28 namespace content { |
| 29 | 29 |
| 30 namespace { | 30 namespace { |
| 31 | 31 |
| 32 // Friendly names for the well-known threads. | 32 // Friendly names for the well-known threads. |
| 33 static const char* g_browser_thread_names[BrowserThread::ID_COUNT] = { | 33 static const char* const g_browser_thread_names[BrowserThread::ID_COUNT] = { |
| 34 "", // UI (name assembled in browser_main.cc). | 34 "", // UI (name assembled in browser_main.cc). |
| 35 "Chrome_DBThread", // DB | 35 "Chrome_DBThread", // DB |
| 36 "Chrome_FileThread", // FILE | 36 "Chrome_FileThread", // FILE |
| 37 "Chrome_FileUserBlockingThread", // FILE_USER_BLOCKING | 37 "Chrome_FileUserBlockingThread", // FILE_USER_BLOCKING |
| 38 "Chrome_ProcessLauncherThread", // PROCESS_LAUNCHER | 38 "Chrome_ProcessLauncherThread", // PROCESS_LAUNCHER |
| 39 "Chrome_CacheThread", // CACHE | 39 "Chrome_CacheThread", // CACHE |
| 40 "Chrome_IOThread", // IO | 40 "Chrome_IOThread", // IO |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 // An implementation of SingleThreadTaskRunner to be used in conjunction | 43 // An implementation of SingleThreadTaskRunner to be used in conjunction |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 AtomicWord* storage = reinterpret_cast<AtomicWord*>( | 552 AtomicWord* storage = reinterpret_cast<AtomicWord*>( |
| 553 &globals.thread_delegates[identifier]); | 553 &globals.thread_delegates[identifier]); |
| 554 AtomicWord old_pointer = base::subtle::NoBarrier_AtomicExchange( | 554 AtomicWord old_pointer = base::subtle::NoBarrier_AtomicExchange( |
| 555 storage, reinterpret_cast<AtomicWord>(delegate)); | 555 storage, reinterpret_cast<AtomicWord>(delegate)); |
| 556 | 556 |
| 557 // This catches registration when previously registered. | 557 // This catches registration when previously registered. |
| 558 DCHECK(!delegate || !old_pointer); | 558 DCHECK(!delegate || !old_pointer); |
| 559 } | 559 } |
| 560 | 560 |
| 561 } // namespace content | 561 } // namespace content |
| OLD | NEW |