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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
10 #include "base/threading/thread_restrictions.h" | 10 #include "base/threading/thread_restrictions.h" |
11 | 11 |
12 // Friendly names for the well-known threads. | 12 // Friendly names for the well-known threads. |
13 static const char* browser_thread_names[BrowserThread::ID_COUNT] = { | 13 static const char* browser_thread_names[BrowserThread::ID_COUNT] = { |
14 "", // UI (name assembled in browser_main.cc). | 14 "", // UI (name assembled in browser_main.cc). |
15 "Chrome_DBThread", // DB | 15 "Chrome_DBThread", // DB |
16 "Chrome_WebKitThread", // WEBKIT | 16 "Chrome_WebKitThread", // WEBKIT |
17 "Chrome_FileThread", // FILE | 17 "Chrome_FileThread", // FILE |
18 "Chrome_ProcessLauncherThread", // PROCESS_LAUNCHER | 18 "Chrome_ProcessLauncherThread", // PROCESS_LAUNCHER |
19 "Chrome_CacheThread", // CACHE | 19 "Chrome_CacheThread", // CACHE |
20 "Chrome_AppCacheThread", // APPCACHE | |
rvargas (doing something else)
2011/10/21 19:46:17
and here
| |
20 "Chrome_IOThread", // IO | 21 "Chrome_IOThread", // IO |
21 #if defined(OS_CHROMEOS) | 22 #if defined(OS_CHROMEOS) |
22 "Chrome_WebSocketproxyThread", // WEB_SOCKET_PROXY | 23 "Chrome_WebSocketproxyThread", // WEB_SOCKET_PROXY |
23 #endif | 24 #endif |
24 }; | 25 }; |
25 | 26 |
26 // An implementation of MessageLoopProxy to be used in conjunction | 27 // An implementation of MessageLoopProxy to be used in conjunction |
27 // with BrowserThread. | 28 // with BrowserThread. |
28 class BrowserThreadMessageLoopProxy : public base::MessageLoopProxy { | 29 class BrowserThreadMessageLoopProxy : public base::MessageLoopProxy { |
29 public: | 30 public: |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
331 } else { | 332 } else { |
332 message_loop->PostNonNestableDelayedTask(from_here, task, delay_ms); | 333 message_loop->PostNonNestableDelayedTask(from_here, task, delay_ms); |
333 } | 334 } |
334 } | 335 } |
335 | 336 |
336 if (!guaranteed_to_outlive_target_thread) | 337 if (!guaranteed_to_outlive_target_thread) |
337 lock_.Release(); | 338 lock_.Release(); |
338 | 339 |
339 return !!message_loop; | 340 return !!message_loop; |
340 } | 341 } |
OLD | NEW |