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

Side by Side Diff: chrome/browser/chromeos/web_socket_proxy_controller.h

Issue 6683060: Private API for extensions like ssh-client that need access to TCP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed changes to rand_util_unittest Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #ifndef CHROME_BROWSER_CHROMEOS_WEB_SOCKET_PROXY_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_WEB_SOCKET_PROXY_CONTROLLER_H_
6 #define CHROME_BROWSER_CHROMEOS_WEB_SOCKET_PROXY_CONTROLLER_H_ 6 #define CHROME_BROWSER_CHROMEOS_WEB_SOCKET_PROXY_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string>
10
9 namespace chromeos { 11 namespace chromeos {
10 12
11 // Controls webproxy to TCP service. 13 // Controls webproxy to TCP service.
12 class WebSocketProxyController { 14 class WebSocketProxyController {
13 public: 15 public:
16 enum ConnectionFlags {
17 PLAIN_TCP = 0,
18 TLS_OVER_TCP = 1 << 0
19 };
20
14 // Can be called on any thread. Subsequent calls are cheap and do nothing. 21 // Can be called on any thread. Subsequent calls are cheap and do nothing.
15 static void Initiate(); 22 static void Initiate();
16 23
17 // All methods can be called on any thread. 24 // All methods can be called on any thread.
18 static void Shutdown(); 25 static void Shutdown();
19 static bool IsInitiated(); 26 static bool IsInitiated();
27
28 static bool CheckCredentials(
29 const std::string& extension_id,
30 const std::string& hostname,
31 unsigned short port,
32 ConnectionFlags);
20 }; 33 };
21 34
22 } // namespace chromeos 35 } // namespace chromeos
23 36
24 #endif // CHROME_BROWSER_CHROMEOS_WEB_SOCKET_PROXY_CONTROLLER_H_ 37 #endif // CHROME_BROWSER_CHROMEOS_WEB_SOCKET_PROXY_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/web_socket_proxy.cc ('k') | chrome/browser/chromeos/web_socket_proxy_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698