| Index: components/data_reduction_proxy/core/common/data_reduction_proxy_server.h
|
| diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_server.h b/components/data_reduction_proxy/core/common/data_reduction_proxy_server.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4f6626fa6e8fe7d2ddda50400c22164b7a010ec5
|
| --- /dev/null
|
| +++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_server.h
|
| @@ -0,0 +1,44 @@
|
| +// Copyright 2016 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 COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_SERVER_H_
|
| +#define COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_SERVER_H_
|
| +
|
| +#include <vector>
|
| +
|
| +#include "components/data_reduction_proxy/proto/client_config.pb.h"
|
| +#include "net/proxy/proxy_server.h"
|
| +
|
| +namespace data_reduction_proxy {
|
| +
|
| +// A class that stores information about a single data reduction proxy server.
|
| +class DataReductionProxyServer {
|
| + public:
|
| + DataReductionProxyServer(const net::ProxyServer& proxy_server,
|
| + ProxyServer_ProxyType proxy_type);
|
| +
|
| + DataReductionProxyServer(const DataReductionProxyServer& other) = default;
|
| +
|
| + DataReductionProxyServer& operator=(const DataReductionProxyServer& other) =
|
| + default;
|
| +
|
| + bool operator==(const DataReductionProxyServer& other) const;
|
| +
|
| + net::ProxyServer proxy_server() const { return proxy_server_; }
|
| +
|
| + static std::vector<net::ProxyServer> ConvertToNetProxyServers(
|
| + const std::vector<DataReductionProxyServer>&
|
| + data_reduction_proxy_servers);
|
| +
|
| + // Returns |proxy_type_| for verification by tests.
|
| + ProxyServer_ProxyType GetProxyTypeForTesting() const;
|
| +
|
| + private:
|
| + net::ProxyServer proxy_server_;
|
| + ProxyServer_ProxyType proxy_type_;
|
| +};
|
| +
|
| +} // namespace data_reduction_proxy
|
| +
|
| +#endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_SERVER_H_
|
|
|