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

Unified Diff: components/dom_distiller/content/browser/distillability_driver.cc

Issue 2649303003: Convert DistillabilityDriver to use the new navigation callbacks. (Closed)
Patch Set: Created 3 years, 11 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 | « components/dom_distiller/content/browser/distillability_driver.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/dom_distiller/content/browser/distillability_driver.cc
diff --git a/components/dom_distiller/content/browser/distillability_driver.cc b/components/dom_distiller/content/browser/distillability_driver.cc
index ad9785433ba70a3c5513b7c8e86df1178528b9f3..8d5b06e6d6b475a41003a897a9ffcb67cacb3c5a 100644
--- a/components/dom_distiller/content/browser/distillability_driver.cc
+++ b/components/dom_distiller/content/browser/distillability_driver.cc
@@ -5,6 +5,7 @@
#include "components/dom_distiller/content/browser/distillability_driver.h"
#include "base/memory/ptr_util.h"
+#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
@@ -88,10 +89,10 @@ void DistillabilityDriver::RenderFrameHostChanged(
SetupMojoService(new_host);
}
-void DistillabilityDriver::DidStartProvisionalLoadForFrame(
- content::RenderFrameHost* render_frame_host, const GURL& validated_url,
- bool is_error_page) {
- SetupMojoService(render_frame_host);
+void DistillabilityDriver::ReadyToCommitNavigation(
+ content::NavigationHandle* navigation_handle) {
+ if (!navigation_handle->IsSamePage())
+ SetupMojoService(navigation_handle->GetRenderFrameHost());
}
void DistillabilityDriver::SetupMojoService(
« no previous file with comments | « components/dom_distiller/content/browser/distillability_driver.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698