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

Unified Diff: chrome/browser/managed_mode/managed_mode_interstitial.h

Issue 23533014: Watch for filtering pref changes in ManagedModeInterstitial and unblock requests if they become… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 7 years, 3 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/managed_mode/managed_mode_interstitial.h
diff --git a/chrome/browser/managed_mode/managed_mode_interstitial.h b/chrome/browser/managed_mode/managed_mode_interstitial.h
index 656727c6dfd76833814bda7b28d4fbf3befe8a95..06027d6df424968e0c8374b4df343c10682dfeb1 100644
--- a/chrome/browser/managed_mode/managed_mode_interstitial.h
+++ b/chrome/browser/managed_mode/managed_mode_interstitial.h
@@ -9,7 +9,7 @@
#include "base/callback.h"
#include "base/compiler_specific.h"
-#include "base/memory/weak_ptr.h"
+#include "base/prefs/pref_change_registrar.h"
#include "content/public/browser/interstitial_page_delegate.h"
#include "url/gurl.h"
@@ -35,6 +35,12 @@ class ManagedModeInterstitial : public content::InterstitialPageDelegate {
virtual void OnProceed() OVERRIDE;
virtual void OnDontProceed() OVERRIDE;
+ // Returns whether the blocked URL is now allowed. Called initially before the
+ // interstitial is shown (to catch race conditions), or when the URL filtering
+ // prefs change.
+ bool ShouldProceed();
+
+ void OnFilteringPrefsChanged();
void DispatchContinueRequest(bool continue_request);
// Owns the interstitial, which owns us.
@@ -42,11 +48,12 @@ class ManagedModeInterstitial : public content::InterstitialPageDelegate {
content::InterstitialPage* interstitial_page_; // Owns us.
+ PrefChangeRegistrar pref_change_registrar_;
+
// The UI language. Used for formatting the URL for display.
std::string languages_;
GURL url_;
- base::WeakPtrFactory<ManagedModeInterstitial> weak_ptr_factory_;
base::Callback<void(bool)> callback_;
DISALLOW_COPY_AND_ASSIGN(ManagedModeInterstitial);
« no previous file with comments | « chrome/browser/managed_mode/managed_mode_browsertest.cc ('k') | chrome/browser/managed_mode/managed_mode_interstitial.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698