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

Unified Diff: chrome/browser/chromeos/web_socket_proxy_helper.h

Issue 8586027: Move DNS resolution from websocket-to-TCP proxy to ExtensionFunction (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed Created 9 years, 1 month 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 | « chrome/browser/chromeos/web_socket_proxy.cc ('k') | chrome/browser/chromeos/web_socket_proxy_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/web_socket_proxy_helper.h
diff --git a/chrome/browser/chromeos/web_socket_proxy_helper.h b/chrome/browser/chromeos/web_socket_proxy_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..1c80ab996fa01a4017b581a690bac34cfc45c8ea
--- /dev/null
+++ b/chrome/browser/chromeos/web_socket_proxy_helper.h
@@ -0,0 +1,34 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_WEB_SOCKET_PROXY_HELPER_H_
+#define CHROME_BROWSER_CHROMEOS_WEB_SOCKET_PROXY_HELPER_H_
+#pragma once
+
+#include <string>
+#include "base/basictypes.h"
+
+namespace chromeos {
+
+// Helper class for WebSocketProxy.
+class WebSocketProxyHelper {
Denis Lagno 2011/11/21 22:38:24 I do not like creating separate classes/abstractio
altimofeev 2011/11/22 07:42:45 1. The reason I have placed it separately is an ab
+ public:
+ // Parses "passport:addr:hostname:port:" string. Returns true on success.
+ static bool FetchPassportAddrNamePort(
+ uint8* begin, uint8* end,
+ std::string* passport, std::string* addr,
+ std::string* hostname, int* port);
+
+ // Fetches a token from the string and erases it. Token separtor is
+ // either ':' or ']:' if the token is started with '[' and
+ // |match_brackets|. Fetching position (start or end) is determined by
+ // |forward|. Returns whether the token was successfully fetched.
+ static bool FetchToken(bool forward, bool match_brackets,
+ std::string* input,
+ std::string* token);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_WEB_SOCKET_PROXY_HELPER_H_
« no previous file with comments | « chrome/browser/chromeos/web_socket_proxy.cc ('k') | chrome/browser/chromeos/web_socket_proxy_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698