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

Unified Diff: components/offline_pages/background/request_coordinator.cc

Issue 2522073002: [OfflinePages] RequestCoordinatorFactory return null for incognito (Closed)
Patch Set: Created 4 years, 1 month 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: components/offline_pages/background/request_coordinator.cc
diff --git a/components/offline_pages/background/request_coordinator.cc b/components/offline_pages/background/request_coordinator.cc
index 6b7753c181d47c4e5b388760d7dbf6234c36e070..7538887b81eb5c78352e8b9f41a3a19815e3bce5 100644
--- a/components/offline_pages/background/request_coordinator.cc
+++ b/components/offline_pages/background/request_coordinator.cc
@@ -194,6 +194,10 @@ int64_t RequestCoordinator::SavePageLater(const GURL& url,
RequestAvailability availability) {
DVLOG(2) << "URL is " << url << " " << __func__;
+ // Make sure this is called on actual instance (as the factory
+ // may not return one for incognito profile).
+ CHECK(this);
fgorski 2016/11/22 21:43:37 I don't think this is a good strategy. (It does no
dougarnett 2016/11/22 22:01:16 I found the Factory returning null was not suffici
+
if (!OfflinePageModel::CanSaveURL(url)) {
DVLOG(1) << "Not able to save page for requested url: " << url;
return 0L;

Powered by Google App Engine
This is Rietveld 408576698