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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java

Issue 2950043004: Only call doUpdateVisitedHistory for the main frame. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientVisitedHistoryTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java b/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java
index 56d09a962cf4bae084ac30ab5b2ad55ca0b0a443..50edaf629b3f8741b94726911965dcf58af437c9 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java
@@ -100,6 +100,8 @@ public class AwWebContentsObserver extends WebContentsObserver {
mCommittedNavigation = true;
+ if (!isInMainFrame) return;
+
AwContentsClient client = mAwContentsClient.get();
if (hasCommitted && client != null) {
boolean isReload = pageTransition != null
@@ -107,8 +109,6 @@ public class AwWebContentsObserver extends WebContentsObserver {
client.getCallbackHelper().postDoUpdateVisitedHistory(url, isReload);
}
- if (!isInMainFrame) return;
-
// Only invoke the onPageCommitVisible callback when navigating to a different document,
// but not when navigating to a different fragment within the same document.
if (!isSameDocument) {
« no previous file with comments | « no previous file | android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientVisitedHistoryTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698