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

Unified Diff: chrome/browser/page_load_metrics/page_load_metrics_observer.h

Issue 2833523002: Adding opt out and previews type information to DRP pingback (Closed)
Patch Set: bengr comments 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
Index: chrome/browser/page_load_metrics/page_load_metrics_observer.h
diff --git a/chrome/browser/page_load_metrics/page_load_metrics_observer.h b/chrome/browser/page_load_metrics/page_load_metrics_observer.h
index 11a98896bd91bf72d28f0f68b05251f2ef5229f3..5c5b29fb2a2e5f45021bf611d10d3e51486aff56 100644
--- a/chrome/browser/page_load_metrics/page_load_metrics_observer.h
+++ b/chrome/browser/page_load_metrics/page_load_metrics_observer.h
@@ -5,11 +5,13 @@
#ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_
#define CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_OBSERVER_H_
+#include <memory>
#include <string>
#include "base/macros.h"
#include "base/optional.h"
#include "chrome/common/page_load_metrics/page_load_timing.h"
+#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_data.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/web_contents_observer.h"
#include "third_party/WebKit/public/platform/WebInputEvent.h"
@@ -199,10 +201,9 @@ struct PageLoadExtraInfo {
struct ExtraRequestInfo {
ExtraRequestInfo(bool was_cached,
int64_t raw_body_bytes,
- bool data_reduction_proxy_used,
- int64_t original_network_content_length);
-
- ExtraRequestInfo(const ExtraRequestInfo& other);
+ int64_t original_network_content_length,
+ std::unique_ptr<data_reduction_proxy::DataReductionProxyData>
+ data_reduction_proxy_data);
~ExtraRequestInfo();
@@ -212,12 +213,13 @@ struct ExtraRequestInfo {
// The number of body (not header) prefilter bytes.
const int64_t raw_body_bytes;
- // Whether this request used Data Reduction Proxy.
- const bool data_reduction_proxy_used;
-
// The number of body (not header) bytes that the data reduction proxy saw
// before it compressed the requests.
const int64_t original_network_content_length;
+
+ // Data related to data saver.
+ const std::unique_ptr<data_reduction_proxy::DataReductionProxyData>
+ data_reduction_proxy_data;
};
// Interface for PageLoadMetrics observers. All instances of this class are

Powered by Google App Engine
This is Rietveld 408576698