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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_pingback_client.cc

Issue 2875993002: Converging the two previews type enums (Closed)
Patch Set: megjablon nit Created 3 years, 7 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 | « chrome/browser/previews/previews_infobar_tab_helper.cc ('k') | no next file » | 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_pingback_client.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_pingback_client.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_pingback_client.cc
index fb72e14dec8197adc3eabf3d9b5533c66ab32201..ec6ffc63bcfd4239aa2616e2bad767e2b3eeef7f 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_pingback_client.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_pingback_client.cc
@@ -111,6 +111,11 @@ void AddDataToPageloadMetrics(const DataReductionProxyData& request_data,
request->set_previews_type(PageloadMetrics_PreviewsType_NONE);
}
+ // Only report opt out information if a server preview was shown (otherwise,
+ // report opt out unknown). Similarly, if app background (Android) caused this
+ // report to be sent before the page load is terminated, do not report opt out
+ // information as the user could reload the original preview after this report
+ // is sent.
if (!was_preview_shown || timing.app_background_occurred) {
request->set_previews_opt_out(PageloadMetrics_PreviewsOptOut_UNKNOWN);
return;
« no previous file with comments | « chrome/browser/previews/previews_infobar_tab_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698