diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-10 18:49:09 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-10 18:49:09 +0000 |
commit | 26f76a49e6cc69a6bb6fff14941623347c6c81a2 (patch) | |
tree | ffbb1b426a653bf56f1313e80b557caf7e1f2f6f /content | |
parent | b2c39e9d909e9f9c59d738f51ccac700edaf30ad (diff) | |
download | chromium_src-26f76a49e6cc69a6bb6fff14941623347c6c81a2.zip chromium_src-26f76a49e6cc69a6bb6fff14941623347c6c81a2.tar.gz chromium_src-26f76a49e6cc69a6bb6fff14941623347c6c81a2.tar.bz2 |
Get rid of BrowserThread::WEB_SOCKET_PROXY. BrowserThread is only for threads that are used in many places. In cases where a specific feature/class needs a thread, it should just create it directly. Add a comment about this in BrowserThread.
Review URL: http://codereview.chromium.org/9146007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117061 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/browser_main_loop.cc | 12 | ||||
-rw-r--r-- | content/browser/browser_main_loop.h | 3 | ||||
-rw-r--r-- | content/browser/browser_thread_impl.cc | 3 | ||||
-rw-r--r-- | content/public/browser/browser_thread.h | 10 |
4 files changed, 4 insertions, 24 deletions
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc index 2a1f681..bfd23b4 100644 --- a/content/browser/browser_main_loop.cc +++ b/content/browser/browser_main_loop.cc @@ -349,12 +349,6 @@ void BrowserMainLoop::RunMainMessageLoopParts( thread_to_start = &io_thread_; options = &io_message_loop_options; break; -#if defined(OS_CHROMEOS) - case BrowserThread::WEB_SOCKET_PROXY: - thread_to_start = &web_socket_proxy_thread_; - options = &io_message_loop_options; - break; -#endif case BrowserThread::UI: case BrowserThread::ID_COUNT: default: @@ -429,7 +423,6 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() { // BrowserThread::ID list. The rationale for the order is as // follows (need to be filled in a bit): // - // - (Not sure why the WEB_SOCKET_PROXY thread is stopped first.) // // - The IO thread is the only user of the CACHE thread. // @@ -468,11 +461,6 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() { case BrowserThread::IO: thread_to_stop = &io_thread_; break; -#if defined(OS_CHROMEOS) - case BrowserThread::WEB_SOCKET_PROXY: - thread_to_stop = &web_socket_proxy_thread_; - break; -#endif case BrowserThread::UI: case BrowserThread::ID_COUNT: default: diff --git a/content/browser/browser_main_loop.h b/content/browser/browser_main_loop.h index b645de7..c08ffb1 100644 --- a/content/browser/browser_main_loop.h +++ b/content/browser/browser_main_loop.h @@ -88,9 +88,6 @@ class BrowserMainLoop { scoped_ptr<BrowserProcessSubThread> process_launcher_thread_; scoped_ptr<BrowserProcessSubThread> cache_thread_; scoped_ptr<BrowserProcessSubThread> io_thread_; -#if defined(OS_CHROMEOS) - scoped_ptr<BrowserProcessSubThread> web_socket_proxy_thread_; -#endif DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); }; diff --git a/content/browser/browser_thread_impl.cc b/content/browser/browser_thread_impl.cc index a66477a..f7cca04 100644 --- a/content/browser/browser_thread_impl.cc +++ b/content/browser/browser_thread_impl.cc @@ -25,9 +25,6 @@ static const char* g_browser_thread_names[BrowserThread::ID_COUNT] = { "Chrome_ProcessLauncherThread", // PROCESS_LAUNCHER "Chrome_CacheThread", // CACHE "Chrome_IOThread", // IO -#if defined(OS_CHROMEOS) - "Chrome_WebSocketproxyThread", // WEB_SOCKET_PROXY -#endif }; // This lock protects |g_browser_threads|. Do not read or modify that diff --git a/content/public/browser/browser_thread.h b/content/public/browser/browser_thread.h index 53345fa..d106929 100644 --- a/content/public/browser/browser_thread.h +++ b/content/public/browser/browser_thread.h @@ -83,12 +83,10 @@ class CONTENT_EXPORT BrowserThread { // This is the thread that processes IPC and network messages. IO, -#if defined(OS_CHROMEOS) - // This thread runs websocket to TCP proxy. - // TODO(dilmah): remove this thread, instead implement this functionality - // as hooks into websocket layer. - WEB_SOCKET_PROXY, -#endif + // NOTE: do not add new threads here that are only used by a small number of + // files. Instead you should just use a Thread class and pass its + // MessageLoopProxy around. Named threads there are only for threads that + // are used in many places. // This identifier does not represent a thread. Instead it counts the // number of well-known threads. Insert new well-known threads before this |