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

Unified Diff: chrome/browser/previews/previews_infobar_tab_helper.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/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);
};
« no previous file with comments | « chrome/browser/previews/previews_infobar_delegate_unittest.cc ('k') | chrome/browser/previews/previews_infobar_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698