OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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.h" | 5 #include "content/browser/browser_thread.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/message_loop_proxy.h" | 8 #include "base/message_loop_proxy.h" |
9 #include "base/threading/thread_restrictions.h" | 9 #include "base/threading/thread_restrictions.h" |
10 | 10 |
11 // Friendly names for the well-known threads. | 11 // Friendly names for the well-known threads. |
12 static const char* browser_thread_names[BrowserThread::ID_COUNT] = { | 12 static const char* browser_thread_names[BrowserThread::ID_COUNT] = { |
13 "", // UI (name assembled in browser_main.cc). | 13 "", // UI (name assembled in browser_main.cc). |
14 "Chrome_DBThread", // DB | 14 "Chrome_DBThread", // DB |
15 "Chrome_WebKitThread", // WEBKIT | 15 "Chrome_WebKitThread", // WEBKIT |
16 "Chrome_FileThread", // FILE | 16 "Chrome_FileThread", // FILE |
17 "Chrome_ProcessLauncherThread", // PROCESS_LAUNCHER | 17 "Chrome_ProcessLauncherThread", // PROCESS_LAUNCHER |
18 "Chrome_CacheThread", // CACHE | 18 "Chrome_CacheThread", // CACHE |
19 "Chrome_IOThread", // IO | 19 "Chrome_IOThread", // IO |
20 "Chrome_GpuThread", // GPU | |
21 #if defined(USE_X11) | 20 #if defined(USE_X11) |
22 "Chrome_Background_X11Thread", // BACKGROUND_X11 | 21 "Chrome_Background_X11Thread", // BACKGROUND_X11 |
23 #endif | 22 #endif |
24 #if defined(OS_CHROMEOS) | 23 #if defined(OS_CHROMEOS) |
25 "Chrome_WebSocketproxyThread", // WEB_SOCKET_PROXY | 24 "Chrome_WebSocketproxyThread", // WEB_SOCKET_PROXY |
26 #endif | 25 #endif |
27 }; | 26 }; |
28 | 27 |
29 // An implementation of MessageLoopProxy to be used in conjunction | 28 // An implementation of MessageLoopProxy to be used in conjunction |
30 // with BrowserThread. | 29 // with BrowserThread. |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 } else { | 298 } else { |
300 message_loop->PostNonNestableDelayedTask(from_here, task, delay_ms); | 299 message_loop->PostNonNestableDelayedTask(from_here, task, delay_ms); |
301 } | 300 } |
302 } | 301 } |
303 | 302 |
304 if (!guaranteed_to_outlive_target_thread) | 303 if (!guaranteed_to_outlive_target_thread) |
305 lock_.Release(); | 304 lock_.Release(); |
306 | 305 |
307 return !!message_loop; | 306 return !!message_loop; |
308 } | 307 } |
OLD | NEW |