mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-28 00:06:09 +03:00
Simplify traffic annotation usage
This commit is contained in:
parent
5976451086
commit
5ebf44568c
@ -23,9 +23,9 @@
|
||||
#include "net/socket/next_proto.h"
|
||||
#include "net/socket/stream_socket.h"
|
||||
#include "net/ssl/ssl_info.h"
|
||||
#include "net/traffic_annotation/network_traffic_annotation.h"
|
||||
|
||||
namespace net {
|
||||
struct NetworkTrafficAnnotationTag;
|
||||
|
||||
// This StreamSocket is used to setup a HTTP CONNECT tunnel.
|
||||
class HttpProxySocket : public StreamSocket {
|
||||
@ -114,7 +114,7 @@ class HttpProxySocket : public StreamSocket {
|
||||
NetLogWithSource net_log_;
|
||||
|
||||
// Traffic annotation for socket control.
|
||||
NetworkTrafficAnnotationTag traffic_annotation_;
|
||||
const NetworkTrafficAnnotationTag& traffic_annotation_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(HttpProxySocket);
|
||||
};
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include "base/time/time.h"
|
||||
#include "net/base/completion_once_callback.h"
|
||||
#include "net/base/completion_repeating_callback.h"
|
||||
#include "net/traffic_annotation/network_traffic_annotation.h"
|
||||
|
||||
namespace net {
|
||||
|
||||
@ -23,6 +22,7 @@ class ClientSocketHandle;
|
||||
class DrainableIOBuffer;
|
||||
class IOBuffer;
|
||||
class StreamSocket;
|
||||
struct NetworkTrafficAnnotationTag;
|
||||
|
||||
class NaiveConnection {
|
||||
public:
|
||||
@ -132,7 +132,7 @@ class NaiveConnection {
|
||||
TimeFunc time_func_;
|
||||
|
||||
// Traffic annotation for socket control.
|
||||
NetworkTrafficAnnotationTag traffic_annotation_;
|
||||
const NetworkTrafficAnnotationTag& traffic_annotation_;
|
||||
|
||||
base::WeakPtrFactory<NaiveConnection> weak_ptr_factory_;
|
||||
|
||||
|
@ -14,7 +14,6 @@
|
||||
#include "net/base/completion_repeating_callback.h"
|
||||
#include "net/log/net_log_with_source.h"
|
||||
#include "net/tools/naive/naive_connection.h"
|
||||
#include "net/traffic_annotation/network_traffic_annotation.h"
|
||||
|
||||
namespace net {
|
||||
|
||||
@ -23,6 +22,7 @@ class HttpNetworkSession;
|
||||
class NaiveConnection;
|
||||
class ServerSocket;
|
||||
class StreamSocket;
|
||||
struct NetworkTrafficAnnotationTag;
|
||||
|
||||
class NaiveProxy : public NaiveConnection::Delegate {
|
||||
public:
|
||||
@ -73,7 +73,7 @@ class NaiveProxy : public NaiveConnection::Delegate {
|
||||
|
||||
std::map<unsigned int, std::unique_ptr<NaiveConnection>> connection_by_id_;
|
||||
|
||||
NetworkTrafficAnnotationTag traffic_annotation_;
|
||||
const NetworkTrafficAnnotationTag& traffic_annotation_;
|
||||
|
||||
base::WeakPtrFactory<NaiveProxy> weak_ptr_factory_;
|
||||
|
||||
|
@ -23,9 +23,9 @@
|
||||
#include "net/socket/next_proto.h"
|
||||
#include "net/socket/stream_socket.h"
|
||||
#include "net/ssl/ssl_info.h"
|
||||
#include "net/traffic_annotation/network_traffic_annotation.h"
|
||||
|
||||
namespace net {
|
||||
struct NetworkTrafficAnnotationTag;
|
||||
|
||||
// This StreamSocket is used to setup a SOCKSv5 handshake with a socks client.
|
||||
// Currently no SOCKSv5 authentication is supported.
|
||||
@ -164,7 +164,7 @@ class Socks5ServerSocket : public StreamSocket {
|
||||
NetLogWithSource net_log_;
|
||||
|
||||
// Traffic annotation for socket control.
|
||||
NetworkTrafficAnnotationTag traffic_annotation_;
|
||||
const NetworkTrafficAnnotationTag& traffic_annotation_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(Socks5ServerSocket);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user