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

Unified Diff: chrome/browser/extensions/api/socket/socket.h

Issue 10692160: Support socket endpoint permissions for AppsV2 Socket API. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix review issues Created 8 years, 4 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
Index: chrome/browser/extensions/api/socket/socket.h
diff --git a/chrome/browser/extensions/api/socket/socket.h b/chrome/browser/extensions/api/socket/socket.h
index a91a45044b34f1d2eb81bd37dc2efbeb5ac0385d..6c7300fd14fd8dede551d9fb3dfb8113ba2d7d80 100644
--- a/chrome/browser/extensions/api/socket/socket.h
+++ b/chrome/browser/extensions/api/socket/socket.h
@@ -35,6 +35,11 @@ typedef base::Callback<
// we need to manage it in the context of an extension.
class Socket : public ApiResource {
public:
+ enum SocketType {
+ TYPE_TCP,
+ TYPE_UDP,
+ };
+
virtual ~Socket();
virtual void Connect(const std::string& address,
int port,
@@ -65,11 +70,12 @@ class Socket : public ApiResource {
virtual bool SetNoDelay(bool no_delay);
bool IsConnected();
- virtual bool IsTCPSocket() = 0;
virtual bool GetPeerAddress(net::IPEndPoint* address) = 0;
virtual bool GetLocalAddress(net::IPEndPoint* address) = 0;
+ virtual SocketType socket_type() const = 0;
Mihai Parparita -not on Chrome 2012/08/14 00:53:09 I believe that per the style guide, hacker_style n
Peng 2012/08/14 17:43:31 Done.
+
static bool StringAndPortToAddressList(const std::string& ip_address_str,
int port,
net::AddressList* address_list);

Powered by Google App Engine
This is Rietveld 408576698