Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4842)

Unified Diff: chrome/browser/browser_main.cc

Issue 6801008: Websocket to TCP proxy running in a separate thread (only on ChromeOS). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: g Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/browser_process.h » ('j') | chrome/browser/chromeos/net/webproxy/conn.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_main.cc
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 75944c5678869e285f40e4ba3b6bd858f3c43a13..09ca24f3579706c2c3a5e6400bb36135ed735d31 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -128,6 +128,7 @@
#include "chrome/browser/chromeos/boot_times_loader.h"
#include "chrome/browser/chromeos/brightness_observer.h"
#include "chrome/browser/chromeos/system_key_event_listener.h"
+#include "chrome/browser/chromeos/webproxy_task.h"
#include "chrome/browser/oom_priority_manager.h"
#endif
@@ -641,6 +642,9 @@ void CreateChildThreads(BrowserProcessImpl* process) {
process->process_launcher_thread();
process->cache_thread();
process->io_thread();
+#if defined(OS_CHROMEOS)
+ process->webproxy_thread();
+#endif
// Create watchdog thread after creating all other threads because it will
// watch the other threads and they must be running.
process->watchdog_thread();
@@ -1470,6 +1474,16 @@ int BrowserMain(const MainFunctionParams& parameters) {
OptionallyRunChromeOSLoginManager(parsed_command_line);
}
+#if defined(OS_CHROMEOS)
+ // We delay launching websocket to TCP proxy because we do not want to
zel 2011/04/07 16:54:12 can we make this launch when API is being used for
Denis Lagno 2011/04/07 17:48:22 it is possible but in this case I need to either m
Denis Lagno 2011/04/11 23:21:27 launching webproxy is on demand now. Idle webproxy
+ // increase startup time accidentally.
+ const int kWebProxyDelayMs = 5000;
+ // TODO(dilmah): remove webproxy thread, instead implement the same
+ // functionality via hooks into websocket layer.
+ g_browser_process->webproxy_thread()->message_loop()->PostDelayedTask(
+ FROM_HERE, new chromeos::WebproxyTask(), kWebProxyDelayMs);
+#endif
+
#if !defined(OS_MACOSX)
// Importing other browser settings is done in a browser-like process
// that exits when this task has finished.
« no previous file with comments | « no previous file | chrome/browser/browser_process.h » ('j') | chrome/browser/chromeos/net/webproxy/conn.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698