| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h
|
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h
|
| index 566181fe3a915629867a02593bd768f02a9257bc..0e4acc37d1ef1dd5dbcd1122839c66f647297811 100644
|
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h
|
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h
|
| @@ -51,21 +51,22 @@ class DataReductionProxyIOData : public DataReductionProxyEventStorageDelegate {
|
| // set information about the DNS names used by the proxy, and allowable
|
| // configurations. |enabled| sets the initial state of the Data Reduction
|
| // Proxy.
|
| DataReductionProxyIOData(
|
| Client client,
|
| int param_flags,
|
| net::NetLog* net_log,
|
| scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
|
| scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
|
| bool enabled,
|
| - const std::string& user_agent);
|
| + const std::string& user_agent,
|
| + const std::string& channel);
|
|
|
| virtual ~DataReductionProxyIOData();
|
|
|
| // Performs UI thread specific shutdown logic.
|
| void ShutdownOnUIThread();
|
|
|
| // Sets the Data Reduction Proxy service after it has been created.
|
| // Virtual for testing.
|
| virtual void SetDataReductionProxyService(
|
| base::WeakPtr<DataReductionProxyService> data_reduction_proxy_service);
|
| @@ -171,20 +172,26 @@ class DataReductionProxyIOData : public DataReductionProxyEventStorageDelegate {
|
| }
|
|
|
| LoFiUIService* lofi_ui_service() const { return lofi_ui_service_.get(); }
|
|
|
| // Takes ownership of |lofi_ui_service|.
|
| void set_lofi_ui_service(
|
| std::unique_ptr<LoFiUIService> lofi_ui_service) const {
|
| lofi_ui_service_ = std::move(lofi_ui_service);
|
| }
|
|
|
| + // The production channel of this build.
|
| + std::string channel() const { return channel_; }
|
| +
|
| + // The Client type of this build.
|
| + Client client() const { return client_; }
|
| +
|
| private:
|
| friend class TestDataReductionProxyIOData;
|
| FRIEND_TEST_ALL_PREFIXES(DataReductionProxyIODataTest, TestConstruction);
|
| FRIEND_TEST_ALL_PREFIXES(DataReductionProxyIODataTest,
|
| TestResetBadProxyListOnDisableDataSaver);
|
|
|
| // Used for testing.
|
| DataReductionProxyIOData();
|
|
|
| // Initializes the weak pointer to |this| on the IO thread. It must be done
|
| @@ -199,21 +206,21 @@ class DataReductionProxyIOData : public DataReductionProxyEventStorageDelegate {
|
| void SetInt64Pref(const std::string& pref_path, int64_t value);
|
|
|
| // Stores a string value in preferences storage.
|
| void SetStringPref(const std::string& pref_path, const std::string& value);
|
|
|
| // Stores a serialized Data Reduction Proxy configuration in preferences
|
| // storage.
|
| void StoreSerializedConfig(const std::string& serialized_config);
|
|
|
| // The type of Data Reduction Proxy client.
|
| - Client client_;
|
| + const Client client_;
|
|
|
| // Parameters including DNS names and allowable configurations.
|
| std::unique_ptr<DataReductionProxyConfig> config_;
|
|
|
| // Handles getting if a request is in Lo-Fi mode.
|
| mutable std::unique_ptr<LoFiDecider> lofi_decider_;
|
|
|
| // Handles showing Lo-Fi UI when a Lo-Fi response is received.
|
| mutable std::unique_ptr<LoFiUIService> lofi_ui_service_;
|
|
|
| @@ -250,17 +257,20 @@ class DataReductionProxyIOData : public DataReductionProxyEventStorageDelegate {
|
| // practice, this can be overridden by the command line.
|
| bool enabled_;
|
|
|
| // The net::URLRequestContextGetter used for making URL requests.
|
| net::URLRequestContextGetter* url_request_context_getter_;
|
|
|
| // A net::URLRequestContextGetter used for making secure proxy checks. It
|
| // does not use alternate protocols.
|
| scoped_refptr<net::URLRequestContextGetter> basic_url_request_context_getter_;
|
|
|
| + // The production channel of this build.
|
| + const std::string channel_;
|
| +
|
| base::WeakPtrFactory<DataReductionProxyIOData> weak_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(DataReductionProxyIOData);
|
| };
|
|
|
| } // namespace data_reduction_proxy
|
| #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_IO_DATA_H_
|
|
|