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

Unified Diff: content/browser/renderer_host/p2p/ssltcp_helper.h

Issue 16516003: SSLTCP (pseudo-SSL with fake handshake and unencrypted data) support for p2p socket. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 6 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: content/browser/renderer_host/p2p/ssltcp_helper.h
===================================================================
--- content/browser/renderer_host/p2p/ssltcp_helper.h (revision 0)
+++ content/browser/renderer_host/p2p/ssltcp_helper.h (revision 0)
@@ -0,0 +1,48 @@
+// Copyright (c) 2013 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 CONTENT_BROWSER_RENDERER_HOST_P2P_SSLTCP_HELPER_H_
+#define CONTENT_BROWSER_RENDERER_HOST_P2P_SSLTCP_HELPER_H_
+
+#include <vector>
+
+#include "base/basictypes.h"
+#include "content/common/content_export.h"
+
+namespace content {
+
+size_t client_hello_message_size();
Sergey Ulanov 2013/06/18 20:01:26 These do not seem to be used anywhere except in ss
+size_t server_hello_message_size();
+
+class CONTENT_EXPORT SsltcpHelper {
Sergey Ulanov 2013/06/18 20:01:26 Add comments to explain what this class is used fo
+ public:
+ SsltcpHelper();
+ ~SsltcpHelper();
+
+ void Init(bool client);
Sergey Ulanov 2013/06/18 20:01:26 instead of using bool define enum Mode { CLIENT, S
+ bool IsClient() const;
+
+ void set_hello_sent(bool hello_sent);
+ bool hello_sent() const;
+ void set_hello_received(bool hello_received);
+ bool hello_received() const;
+ const std::vector<char>& client_hello_message() const;
+ const std::vector<char>& server_hello_message() const;
+ bool IsHelloMessage(const char* message);
+ size_t hello_message_size();
+ size_t remote_hello_message_size();
+
+ private:
+ bool client_;
+ bool hello_sent_;
+ bool hello_received_;
+ std::vector<char> client_hello_message_;
+ std::vector<char> server_hello_message_;
+
+ DISALLOW_COPY_AND_ASSIGN(SsltcpHelper);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SSLTCP_HELPER_H_
Property changes on: content/browser/renderer_host/p2p/ssltcp_helper.h
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698