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

Unified Diff: chrome/browser/ui/passwords/manage_passwords_ui_controller.cc

Issue 2659983002: Convert ManagePasswordsUIController to use the new navigation callbacks. (Closed)
Patch Set: fix tests 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
Index: chrome/browser/ui/passwords/manage_passwords_ui_controller.cc
diff --git a/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc b/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc
index cdddb4508fd15001020702d0457fc84fdb485fa0..0e2ec7f14a5cccbb58e1b6c5f71f7f395a5b07d5 100644
--- a/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_ui_controller.cc
@@ -28,7 +28,7 @@
#include "components/password_manager/core/browser/password_manager_constants.h"
#include "components/password_manager/core/browser/statistics_table.h"
#include "components/password_manager/core/common/credential_manager_types.h"
-#include "content/public/browser/navigation_details.h"
+#include "content/public/browser/navigation_handle.h"
using password_manager::PasswordFormManager;
@@ -409,12 +409,14 @@ bool ManagePasswordsUIController::HasBrowserWindow() const {
return chrome::FindBrowserWithWebContents(web_contents()) != nullptr;
}
-void ManagePasswordsUIController::DidNavigateMainFrame(
- const content::LoadCommittedDetails& details,
- const content::FrameNavigateParams& params) {
- // Don't react to in-page (fragment) navigations.
- if (details.is_in_page)
+void ManagePasswordsUIController::DidFinishNavigation(
+ content::NavigationHandle* navigation_handle) {
+ if (!navigation_handle->IsInMainFrame() ||
+ !navigation_handle->HasCommitted() ||
+ // Don't react to in-page (fragment) navigations.
+ navigation_handle->IsSamePage()) {
return;
+ }
// It is possible that the user was not able to interact with the password
// bubble.

Powered by Google App Engine
This is Rietveld 408576698