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

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

Issue 2713013002: Track original URL when downloading a redirected page (Closed)
Patch Set: Update BUILD.gn to fix DEP check in analyze Created 3 years, 10 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 | chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.cc » ('j') | 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 34459c72c7fb8881d4fc6cf22b8f23d437c32a92..e1a2be86f4d010fde82f9a2fe44c52f7a7522348 100644
--- a/chrome/browser/android/offline_pages/background_loader_offliner.cc
+++ b/chrome/browser/android/offline_pages/background_loader_offliner.cc
@@ -162,7 +162,9 @@ void BackgroundLoaderOffliner::DidStopLoading() {
// Pass in the original URL if it's different from last committed
// when redirects occur.
- if (params.url != request.url())
+ if (!request.original_url().is_empty())
+ params.original_url = request.original_url();
+ else if (params.url != request.url())
params.original_url = request.url();
offline_page_model_->SavePage(
« no previous file with comments | « no previous file | chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698