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

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: 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
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 0d8316eed6fea7513c43009212d015ce7de86141..ac03c87201816a6195bfb9dc2c12ed7fc14bfa5d 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"
@@ -935,6 +936,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

Powered by Google App Engine
This is Rietveld 408576698