| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_data.h
|
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_data.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_data.h
|
| index 7af3c28534fb6052be9172e772308ddf922d1b70..3b4b53f85464af8fc87c3a45b4ad1c06e1e775b8 100644
|
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_data.h
|
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_data.h
|
| @@ -38,36 +38,38 @@ class DataReductionProxyData : public base::SupportsUserData::Data {
|
| void set_lofi_requested(bool lofi_requested) {
|
| lofi_requested_ = lofi_requested;
|
| }
|
|
|
| // The session key used for this request.
|
| std::string session_key() const { return session_key_; }
|
| void set_session_key(const std::string& session_key) {
|
| session_key_ = session_key;
|
| }
|
|
|
| - // The URL of the request before redirects.
|
| - GURL original_request_url() const { return original_request_url_; }
|
| - void set_original_request_url(const GURL& original_request_url) {
|
| - original_request_url_ = original_request_url;
|
| - }
|
| + // The URL the frame is navigating to. This may change during the navigation
|
| + // when encountering a server redirect.
|
| + GURL request_url() const { return request_url_; }
|
| + void set_request_url(const GURL& request_url) { request_url_ = request_url; }
|
|
|
| - // The EffectiveConnectionType when the request starts. This is set for main
|
| - // frame requests only.
|
| + // The EffectiveConnectionType after the proxy is resolved. This is set for
|
| + // main frame requests only.
|
| net::EffectiveConnectionType effective_connection_type() const {
|
| return effective_connection_type_;
|
| }
|
| void set_effective_connection_type(
|
| const net::EffectiveConnectionType& effective_connection_type) {
|
| effective_connection_type_ = effective_connection_type;
|
| }
|
|
|
| + // Removes |this| from |request|.
|
| + static void ClearData(net::URLRequest* request);
|
| +
|
| // Returns the Data from the URLRequest's UserData.
|
| static DataReductionProxyData* GetData(const net::URLRequest& request);
|
| // Returns the Data for a given URLRequest. If there is currently no
|
| // DataReductionProxyData on URLRequest, it creates one, and adds it to the
|
| // URLRequest's UserData, and returns a raw pointer to the new instance.
|
| static DataReductionProxyData* GetDataAndCreateIfNecessary(
|
| net::URLRequest* request);
|
|
|
| // Create a brand new instance of DataReductionProxyData that could be used in
|
| // a different thread. Several of deep copies may occur per navigation, so
|
| @@ -79,22 +81,23 @@ class DataReductionProxyData : public base::SupportsUserData::Data {
|
| bool used_data_reduction_proxy_;
|
|
|
| // Whether Lo-Fi was requested for this request or navigation. True if the
|
| // session is in Lo-Fi control or enabled group, and the network quality is
|
| // slow.
|
| bool lofi_requested_;
|
|
|
| // The session key used for this request or navigation.
|
| std::string session_key_;
|
|
|
| - // The URL of the request before redirects.
|
| - GURL original_request_url_;
|
| + // The URL the frame is navigating to. This may change during the navigation
|
| + // when encountering a server redirect.
|
| + GURL request_url_;
|
|
|
| // The EffectiveConnectionType when the request or navigation starts. This is
|
| // set for main frame requests only.
|
| net::EffectiveConnectionType effective_connection_type_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(DataReductionProxyData);
|
| };
|
|
|
| } // namespace data_reduction_proxy
|
|
|
|
|