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 fd8f4f50898b4322ba14a04ff26de1ff6baef145..54d6cc3a0d6cdb74a9c775f958b86f92e3f53412 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 |
@@ -5,6 +5,8 @@ |
#ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_DATA_H_ |
#define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_DATA_H_ |
+#include <stdint.h> |
+ |
#include <memory> |
#include <string> |
@@ -41,6 +43,16 @@ class DataReductionProxyData : public base::SupportsUserData::Data { |
lofi_requested_ = lofi_requested; |
} |
+ // Whether a lite page response was seen for the request or navigation. |
+ bool lite_page_received() const { return lite_page_received_; } |
+ void set_lite_page_received(bool lite_page_received) { |
+ lite_page_received_ = lite_page_received; |
+ } |
+ |
+ // Whether a lite page response was seen for the request or navigation. |
+ bool lofi_received() const { return lofi_received_; } |
+ void set_lofi_received(bool lofi_received) { lofi_received_ = lofi_received; } |
+ |
// The session key used for this request. |
std::string session_key() const { return session_key_; } |
void set_session_key(const std::string& session_key) { |
@@ -64,7 +76,7 @@ class DataReductionProxyData : public base::SupportsUserData::Data { |
// An identifier that is guaranteed to be unique to each page load during a |
// data saver session. Only present on main frame requests. |
- base::Optional<uint64_t> page_id() const { return page_id_; } |
+ const base::Optional<uint64_t>& page_id() const { return page_id_; } |
void set_page_id(uint64_t page_id) { page_id_ = page_id; } |
// Removes |this| from |request|. |
@@ -92,6 +104,12 @@ class DataReductionProxyData : public base::SupportsUserData::Data { |
// slow. |
bool lofi_requested_; |
+ // Whether a lite page response was seen for the request or navigation. |
+ bool lite_page_received_; |
+ |
+ // Whether a lite page response was seen for the request or navigation. |
+ bool lofi_received_; |
+ |
// The session key used for this request or navigation. |
std::string session_key_; |