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

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

Issue 2462713003: Offline Page Cache: do not save a snapshot of a page loaded from a snapshot. (Closed)
Patch Set: Created 4 years, 2 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/recent_tab_helper.cc
diff --git a/chrome/browser/android/offline_pages/recent_tab_helper.cc b/chrome/browser/android/offline_pages/recent_tab_helper.cc
index 9ab53f96fb4766b439c334d6857f8e4d5aed5d74..0f723c58a9a9d7da26da2e3ef043964b5c7cb5c8 100644
--- a/chrome/browser/android/offline_pages/recent_tab_helper.cc
+++ b/chrome/browser/android/offline_pages/recent_tab_helper.cc
@@ -164,7 +164,9 @@ void RecentTabHelper::DidFinishNavigation(
// Check for conditions that would cause us not to snapshot.
bool can_save = !navigation_handle->IsErrorPage() &&
- OfflinePageModel::CanSaveURL(snapshot_url_);
+ OfflinePageModel::CanSaveURL(snapshot_url_) &&
+ OfflinePageUtils::GetOfflinePageFromWebContents(
+ web_contents()) == nullptr;
UMA_HISTOGRAM_BOOLEAN("OfflinePages.CanSaveRecentPage", can_save);
« 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