diff options
author | dilmah@chromium.org <dilmah@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-10 16:48:44 +0000 |
---|---|---|
committer | dilmah@chromium.org <dilmah@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-10 16:48:44 +0000 |
commit | 2d14b373ac9ef900b12160ba64bafdcc0530f1dc (patch) | |
tree | 52e15b1f248599722f3d29cc4a4a5ee894e5fe65 /content | |
parent | 658e883290c87808964c8fe245a4755c67b98eab (diff) | |
download | chromium_src-2d14b373ac9ef900b12160ba64bafdcc0530f1dc.zip chromium_src-2d14b373ac9ef900b12160ba64bafdcc0530f1dc.tar.gz chromium_src-2d14b373ac9ef900b12160ba64bafdcc0530f1dc.tar.bz2 |
Websocket to TCP proxy running in a separate thread (only on ChromeOS).
With this webproxy: authorized extensions can connect to ws://127.0.0.1:10101/tcpproxy,
pass authorization_token:hostname:port: in first frame,
then webproxy establishes TCP connection to hostname:port and forwards any subsequent
communication.
Subsequent communication between extension and webproxy is base64-encoded.
TODO(dilmah): remove this temporary solution, get rid of separate thread and listening socket,
instead provide the same functionality via hooks into websocket layer.
BUG=chromium-os:9667
TEST=Manual
Review URL: http://codereview.chromium.org/6801008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84795 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/browser_thread.cc | 3 | ||||
-rw-r--r-- | content/browser/browser_thread.h | 7 | ||||
-rw-r--r-- | content/common/notification_type.h | 5 |
3 files changed, 15 insertions, 0 deletions
diff --git a/content/browser/browser_thread.cc b/content/browser/browser_thread.cc index f02f313..47b7861 100644 --- a/content/browser/browser_thread.cc +++ b/content/browser/browser_thread.cc @@ -21,6 +21,9 @@ static const char* browser_thread_names[BrowserThread::ID_COUNT] = { #if defined(USE_X11) "Chrome_Background_X11Thread", // BACKGROUND_X11 #endif +#if defined(OS_CHROMEOS) + "Chrome_WebSocketproxyThread", // WEB_SOCKET_PROXY +#endif }; // An implementation of MessageLoopProxy to be used in conjunction diff --git a/content/browser/browser_thread.h b/content/browser/browser_thread.h index b54f5fe..680c25a 100644 --- a/content/browser/browser_thread.h +++ b/content/browser/browser_thread.h @@ -75,6 +75,13 @@ class BrowserThread : public base::Thread { BACKGROUND_X11, #endif +#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 + // This identifier does not represent a thread. Instead it counts the // number of well-known threads. Insert new well-known threads before this // identifier. diff --git a/content/common/notification_type.h b/content/common/notification_type.h index 1744081..9b9ab0d 100644 --- a/content/common/notification_type.h +++ b/content/common/notification_type.h @@ -1283,6 +1283,11 @@ class NotificationType { // Sent when the applications in the NTP app launcher have been reordered. EXTENSION_LAUNCHER_REORDERED, +#if defined(OS_CHROMEOS) + // Sent when WebSocketProxy started accepting connections. + WEB_SOCKET_PROXY_STARTED, +#endif + // Sent when a new web store promo has been loaded. WEB_STORE_PROMO_LOADED, |