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

Unified Diff: android_webview/native/permission/permission_request_handler.cc

Issue 1223643002: android_webview: Replace usage of GetActiveEntry by GetLastCommittedEntry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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: android_webview/native/permission/permission_request_handler.cc
diff --git a/android_webview/native/permission/permission_request_handler.cc b/android_webview/native/permission/permission_request_handler.cc
index e97cd83da29b38aa8ef6adf620790b29a8bef595..28c359e7f25880fde26d364fc33d0f74814c87e2 100644
--- a/android_webview/native/permission/permission_request_handler.cc
+++ b/android_webview/native/permission/permission_request_handler.cc
@@ -19,21 +19,22 @@ namespace android_webview {
namespace {
-int GetActiveEntryID(content::WebContents* web_contents) {
+int GetLastCommittedEntryID(content::WebContents* web_contents) {
if (!web_contents) return 0;
- content::NavigationEntry* active_entry =
- web_contents->GetController().GetActiveEntry();
- return active_entry ? active_entry->GetUniqueID() : 0;
+ content::NavigationEntry* entry =
+ web_contents->GetController().GetLastCommittedEntry();
+ return entry ? entry->GetUniqueID() : 0;
}
} // namespace
PermissionRequestHandler::PermissionRequestHandler(
- PermissionRequestHandlerClient* client, content::WebContents* web_contents)
+ PermissionRequestHandlerClient* client,
+ content::WebContents* web_contents)
: content::WebContentsObserver(web_contents),
client_(client),
- contents_unique_id_(GetActiveEntryID(web_contents)) {
+ contents_unique_id_(GetLastCommittedEntryID(web_contents)) {
}
PermissionRequestHandler::~PermissionRequestHandler() {

Powered by Google App Engine
This is Rietveld 408576698