This commit is contained in:
klzgrad 2020-09-06 17:19:23 +08:00
parent 529ff77c85
commit 458c165811
4 changed files with 16 additions and 8 deletions

View File

@ -31,10 +31,9 @@ class ClientPaddingDetectorDelegate;
// This StreamSocket is used to setup a HTTP CONNECT tunnel.
class HttpProxySocket : public StreamSocket {
public:
HttpProxySocket(
std::unique_ptr<StreamSocket> transport_socket,
ClientPaddingDetectorDelegate* padding_detector_delegate,
const NetworkTrafficAnnotationTag& traffic_annotation);
HttpProxySocket(std::unique_ptr<StreamSocket> transport_socket,
ClientPaddingDetectorDelegate* padding_detector_delegate,
const NetworkTrafficAnnotationTag& traffic_annotation);
// On destruction Disconnect() is called.
~HttpProxySocket() override;

View File

@ -1,3 +1,6 @@
// Copyright 2020 klzgrad <kizdiv@gmail.com>. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef NET_TOOLS_NAIVE_NAIVE_PROTOCOL_H_
#define NET_TOOLS_NAIVE_NAIVE_PROTOCOL_H_
@ -18,4 +21,4 @@ enum Direction {
};
} // namespace net
#endif // NET_TOOLS_NAIVE_NAIVE_PROTOCOL_H_
#endif // NET_TOOLS_NAIVE_NAIVE_PROTOCOL_H_

View File

@ -1,3 +1,6 @@
// Copyright 2020 klzgrad <kizdiv@gmail.com>. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/tools/naive/naive_proxy_delegate.h"
#include <string>
@ -152,4 +155,4 @@ PaddingSupport PaddingDetectorDelegate::GetServerPaddingSupport() {
return cached_server_padding_support_;
}
} // namespace net
} // namespace net

View File

@ -1,3 +1,6 @@
// Copyright 2020 klzgrad <kizdiv@gmail.com>. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef NET_TOOLS_NAIVE_NAIVE_PROXY_DELEGATE_H_
#define NET_TOOLS_NAIVE_NAIVE_PROXY_DELEGATE_H_
@ -31,7 +34,7 @@ enum class PaddingSupport {
class NaiveProxyDelegate : public ProxyDelegate {
public:
NaiveProxyDelegate(const HttpRequestHeaders& extra_headers);
explicit NaiveProxyDelegate(const HttpRequestHeaders& extra_headers);
~NaiveProxyDelegate() override;
void OnResolveProxy(const GURL& url,
@ -88,4 +91,4 @@ class PaddingDetectorDelegate : public ClientPaddingDetectorDelegate {
};
} // namespace net
#endif // NET_TOOLS_NAIVE_NAIVE_PROXY_DELEGATE_H_
#endif // NET_TOOLS_NAIVE_NAIVE_PROXY_DELEGATE_H_