Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_data.h

Issue 2803813003: Adding a data saver page id to requests and reports (Closed)
Patch Set: bengr nits Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/data_reduction_proxy/core/browser/data_reduction_proxy_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3b4b53f85464af8fc87c3a45b4ad1c06e1e775b8..fd8f4f50898b4322ba14a04ff26de1ff6baef145 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
@@ -9,6 +9,7 @@
#include <string>
#include "base/macros.h"
+#include "base/optional.h"
#include "base/supports_user_data.h"
#include "net/nqe/effective_connection_type.h"
#include "url/gurl.h"
@@ -24,6 +25,7 @@ namespace data_reduction_proxy {
class DataReductionProxyData : public base::SupportsUserData::Data {
public:
DataReductionProxyData();
+ ~DataReductionProxyData() override;
// Whether the DataReductionProxy was used for this request or navigation.
bool used_data_reduction_proxy() const { return used_data_reduction_proxy_; }
@@ -60,6 +62,11 @@ class DataReductionProxyData : public base::SupportsUserData::Data {
effective_connection_type_ = effective_connection_type;
}
+ // 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_; }
+ void set_page_id(uint64_t page_id) { page_id_ = page_id; }
+
// Removes |this| from |request|.
static void ClearData(net::URLRequest* request);
@@ -96,6 +103,10 @@ class DataReductionProxyData : public base::SupportsUserData::Data {
// set for main frame requests only.
net::EffectiveConnectionType effective_connection_type_;
+ // 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_;
+
DISALLOW_COPY_AND_ASSIGN(DataReductionProxyData);
};
« no previous file with comments | « no previous file | components/data_reduction_proxy/core/browser/data_reduction_proxy_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698