Index: chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc |
diff --git a/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc b/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc |
index 09b4d9e476cc083f0ccb8ae486ab9be7557ecf5f..72e6fe536df9e311735690cf513d22191802f031 100644 |
--- a/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc |
+++ b/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc |
@@ -192,9 +192,9 @@ void AutofillDialogControllerAndroid::Show() { |
JNIEnv* env = base::android::AttachCurrentThread(); |
dialog_shown_timestamp_ = base::Time::Now(); |
- content::NavigationEntry* entry = contents_->GetController().GetActiveEntry(); |
- const GURL& active_url = entry ? entry->GetURL() : contents_->GetURL(); |
- invoked_from_same_origin_ = active_url.GetOrigin() == source_url_.GetOrigin(); |
+ const GURL& current_url = contents_->GetLastCommittedURL(); |
+ invoked_from_same_origin_ = |
+ current_url.GetOrigin() == source_url_.GetOrigin(); |
// Determine what field types should be included in the dialog. |
bool has_types = false; |