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

Unified Diff: chrome/browser/supervised_user/supervised_user_navigation_observer.h

Issue 2845053002: Avoid showing the supervised user block interstitial more than once (Closed)
Patch Set: comment 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/supervised_user/supervised_user_navigation_observer.h
diff --git a/chrome/browser/supervised_user/supervised_user_navigation_observer.h b/chrome/browser/supervised_user/supervised_user_navigation_observer.h
index d6810836c0ab778943525d33b3b6d9ef7abbec49..3eb23db8e6bef5eabc0a1b94862f5b6190e709a9 100644
--- a/chrome/browser/supervised_user/supervised_user_navigation_observer.h
+++ b/chrome/browser/supervised_user/supervised_user_navigation_observer.h
@@ -54,7 +54,10 @@ class SupervisedUserNavigationObserver
explicit SupervisedUserNavigationObserver(content::WebContents* web_contents);
- void OnRequestBlockedInternal(const GURL& url);
+ void OnRequestBlockedInternal(
+ const GURL& url,
+ supervised_user_error_page::FilteringBehaviorReason reason,
+ const base::Callback<void(bool)>& callback);
void URLFilterCheckCallback(
const GURL& url,
@@ -62,12 +65,23 @@ class SupervisedUserNavigationObserver
supervised_user_error_page::FilteringBehaviorReason reason,
bool uncertain);
+ void MaybeShowInterstitial(
+ const GURL& url,
+ supervised_user_error_page::FilteringBehaviorReason reason,
+ bool initial_page_load,
+ const base::Callback<void(bool)>& callback);
+
+ void OnInterstitialResult(const base::Callback<void(bool)>& callback,
+ bool result);
+
// Owned by SupervisedUserService.
const SupervisedUserURLFilter* url_filter_;
// Owned by SupervisedUserServiceFactory (lifetime of Profile).
SupervisedUserService* supervised_user_service_;
+ bool is_showing_interstitial_ = false;
+
std::vector<std::unique_ptr<const sessions::SerializedNavigationEntry>>
blocked_navigations_;

Powered by Google App Engine
This is Rietveld 408576698