Index: chrome/browser/previews/previews_infobar_tab_helper.h |
diff --git a/chrome/browser/previews/previews_infobar_tab_helper.h b/chrome/browser/previews/previews_infobar_tab_helper.h |
index 512726f127512966e6d584d7c32d679b052af916..949ac7ea2f1ca34720c005d7ba8d9b2c7d3d9142 100644 |
--- a/chrome/browser/previews/previews_infobar_tab_helper.h |
+++ b/chrome/browser/previews/previews_infobar_tab_helper.h |
@@ -6,6 +6,8 @@ |
#define CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_TAB_HELPER_H_ |
#include "base/macros.h" |
+#include "base/optional.h" |
+#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pingback_client.h" |
#include "content/public/browser/web_contents_observer.h" |
#include "content/public/browser/web_contents_user_data.h" |
@@ -29,19 +31,35 @@ class PreviewsInfoBarTabHelper |
displayed_preview_infobar_ = displayed; |
} |
+ // The data saver page identifier of the current page load. |
+ const base::Optional<data_reduction_proxy::NavigationID>& |
+ committed_data_saver_navigation_id() { |
+ return committed_data_saver_navigation_id_; |
+ } |
+ |
private: |
friend class content::WebContentsUserData<PreviewsInfoBarTabHelper>; |
friend class PreviewsInfoBarTabHelperUnitTest; |
explicit PreviewsInfoBarTabHelper(content::WebContents* web_contents); |
+ // Clears the last navigation from this tab in the pingback client. |
+ void ClearLastNavigationAsync() const; |
+ |
// Overridden from content::WebContentsObserver: |
void DidFinishNavigation( |
content::NavigationHandle* navigation_handle) override; |
+ // Stored for use in the destructor. |
+ content::BrowserContext* browser_context_; |
+ |
// True if the InfoBar for a preview has been shown for the page. |
bool displayed_preview_infobar_; |
+ // The data saver page identifier of the current page load. |
+ base::Optional<data_reduction_proxy::NavigationID> |
+ committed_data_saver_navigation_id_; |
+ |
DISALLOW_COPY_AND_ASSIGN(PreviewsInfoBarTabHelper); |
}; |