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

Unified Diff: chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc

Issue 2916253002: Add UMA to determine how often we offline a page with previews. (Closed)
Patch Set: Histograms fix Created 3 years, 6 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/loader/chrome_resource_dispatcher_host_delegate.cc
diff --git a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
index 57fd85caa950166ca0ce15a16bb28b99cf48b3e3..4618f999dc365ae96f0ff85fd1cc3a09b39c9377 100644
--- a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
+++ b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
@@ -71,6 +71,7 @@
#include "content/public/browser/service_worker_context.h"
#include "content/public/browser/stream_info.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/common/previews_state.h"
#include "content/public/common/resource_response.h"
#include "extensions/features/features.h"
#include "net/base/load_flags.h"
@@ -943,6 +944,13 @@ ChromeResourceDispatcherHostDelegate::GetNavigationData(
if (!request)
return data;
+ // Update the previews state from the navigation data.
+ const content::ResourceRequestInfo* info =
+ content::ResourceRequestInfo::ForRequest(request);
+ if (info) {
+ data->set_previews_state(info->GetPreviewsState());
+ }
+
data_reduction_proxy::DataReductionProxyData* data_reduction_proxy_data =
data_reduction_proxy::DataReductionProxyData::GetData(*request);
// DeepCopy the DataReductionProxyData from the URLRequest to prevent the
« no previous file with comments | « chrome/browser/loader/chrome_navigation_data.cc ('k') | chrome/browser/offline_pages/background_loader_offliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698