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

Unified Diff: chrome/browser/android/offline_pages/background_loader_offliner.cc

Issue 2771933004: [Offline pages] Check errors and invalidate pointers only for mainframe for navigation (Closed)
Patch Set: Created 3 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/offline_pages/background_loader_offliner.cc
diff --git a/chrome/browser/android/offline_pages/background_loader_offliner.cc b/chrome/browser/android/offline_pages/background_loader_offliner.cc
index 9246ff6c086d9097e971c403a5472cc7447c84c2..dad0627bb278241d61ebf97df7adccbedcc29400 100644
--- a/chrome/browser/android/offline_pages/background_loader_offliner.cc
+++ b/chrome/browser/android/offline_pages/background_loader_offliner.cc
@@ -228,6 +228,8 @@ void BackgroundLoaderOffliner::WebContentsDestroyed() {
void BackgroundLoaderOffliner::DidFinishNavigation(
content::NavigationHandle* navigation_handle) {
+ if (!navigation_handle->IsInMainFrame())
+ return;
// If there was an error of any kind (certificate, client, DNS, etc),
// Mark as error page. Resetting here causes RecordNavigationMetrics to crash.
if (navigation_handle->IsErrorPage()) {
@@ -264,7 +266,7 @@ void BackgroundLoaderOffliner::DidFinishNavigation(
}
}
- // If the page is not the same, invalidate any pending save tasks.
+ // If the document is not the same invalidate any pending save tasks.
//
// Downloads or 204/205 response codes do not commit (no new navigation)
// Same-Page (committed) navigations are:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698