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

Unified Diff: chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc

Issue 2661693002: Convert SaveCardBubbleControllerImpl to use the new navigation callbacks. (Closed)
Patch Set: fix test 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/autofill/save_card_bubble_controller_impl.cc
diff --git a/chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc b/chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc
index 168c74e3f2e592a0667a89144c692097bafc2857..152d4ec898fdf423532794d8dd1c76776e8b77ba 100644
--- a/chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc
+++ b/chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc
@@ -14,7 +14,7 @@
#include "components/autofill/core/browser/autofill_metrics.h"
#include "components/autofill/core/common/autofill_constants.h"
#include "components/strings/grit/components_strings.h"
-#include "content/public/browser/navigation_details.h"
+#include "content/public/browser/navigation_handle.h"
#include "ui/base/l10n/l10n_util.h"
DEFINE_WEB_CONTENTS_USER_DATA_KEY(autofill::SaveCardBubbleControllerImpl);
@@ -163,15 +163,17 @@ base::TimeDelta SaveCardBubbleControllerImpl::Elapsed() const {
return timer_->Elapsed();
}
-void SaveCardBubbleControllerImpl::DidNavigateMainFrame(
- const content::LoadCommittedDetails& details,
- const content::FrameNavigateParams& params) {
+void SaveCardBubbleControllerImpl::DidFinishNavigation(
+ content::NavigationHandle* navigation_handle) {
+ if (!navigation_handle->IsInMainFrame() || !navigation_handle->HasCommitted())
+ return;
+
// Nothing to do if there's no bubble available.
if (save_card_callback_.is_null())
return;
// Don't react to in-page (fragment) navigations.
- if (details.is_in_page)
+ if (navigation_handle->IsSamePage())
return;
// Don't do anything if a navigation occurs before a user could reasonably

Powered by Google App Engine
This is Rietveld 408576698