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

Unified Diff: components/navigation_interception/intercept_navigation_throttle.h

Issue 1412113006: Prevent the destruction of WebContents in NavigationThrottle methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « no previous file | components/navigation_interception/intercept_navigation_throttle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/navigation_interception/intercept_navigation_throttle.h
diff --git a/components/navigation_interception/intercept_navigation_throttle.h b/components/navigation_interception/intercept_navigation_throttle.h
index 0b7f74605378266e5e09a549127d53639e1617a4..160e6450f01ee8569ea64de2955cbd1c8444ca81 100644
--- a/components/navigation_interception/intercept_navigation_throttle.h
+++ b/components/navigation_interception/intercept_navigation_throttle.h
@@ -24,7 +24,8 @@ class NavigationParams;
// This class allows the provider of the Callback to selectively ignore top
// level navigations. This is a UI thread class.
-class InterceptNavigationThrottle : public content::NavigationThrottle {
+class InterceptNavigationThrottle
+ : public content::NavigationThrottle {
public:
typedef base::Callback<bool(content::WebContents* /* source */,
const NavigationParams& /* navigation_params */)>
@@ -43,6 +44,8 @@ class InterceptNavigationThrottle : public content::NavigationThrottle {
CheckCallback should_ignore_callback_;
+ base::WeakPtrFactory<InterceptNavigationThrottle> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(InterceptNavigationThrottle);
};
« no previous file with comments | « no previous file | components/navigation_interception/intercept_navigation_throttle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698