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

Unified Diff: chrome/browser/extensions/webstore_inline_installer.cc

Issue 2678843003: Convert WebstoreInlineInstaller to use the new navigation callbacks. (Closed)
Patch Set: Created 3 years, 10 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 | « chrome/browser/extensions/webstore_inline_installer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/webstore_inline_installer.cc
diff --git a/chrome/browser/extensions/webstore_inline_installer.cc b/chrome/browser/extensions/webstore_inline_installer.cc
index 38931a3a35395b9415c522f708252523cc06b337..ce2387ed5f99a5f59cce69d5c963be1da7ec984e 100644
--- a/chrome/browser/extensions/webstore_inline_installer.cc
+++ b/chrome/browser/extensions/webstore_inline_installer.cc
@@ -13,8 +13,8 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
-#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
+#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/web_contents.h"
using content::WebContents;
@@ -229,13 +229,14 @@ bool WebstoreInlineInstaller::CheckRequestorPermitted(
// Private implementation.
//
-void WebstoreInlineInstaller::DidNavigateAnyFrame(
- content::RenderFrameHost* render_frame_host,
- const content::LoadCommittedDetails& details,
- const content::FrameNavigateParams& params) {
- if (!details.is_in_page &&
- (render_frame_host == host_ || details.is_main_frame))
+void WebstoreInlineInstaller::DidFinishNavigation(
+ content::NavigationHandle* navigation_handle) {
+ if (navigation_handle->HasCommitted() &&
+ !navigation_handle->IsSamePage() &&
+ (navigation_handle->GetRenderFrameHost() == host_ ||
+ navigation_handle->IsInMainFrame())) {
host_ = nullptr;
+ }
}
void WebstoreInlineInstaller::WebContentsDestroyed() {
« no previous file with comments | « chrome/browser/extensions/webstore_inline_installer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698