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

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 12086021: Allow automatic use of stale cache entries if site is unreachable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed redirect behavior. Created 7 years, 11 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 | « chrome/browser/about_flags.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/resource_dispatcher_host_impl.cc
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index 36fee38a162d26c4541a524014af9b185faba471..73fca9e188e09c3d41fcf1774baa2e361ab409af 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -311,6 +311,11 @@ int BuildLoadFlagsForRequest(const ResourceHostMsg_Request& request_data,
net::LOAD_DO_NOT_SAVE_COOKIES);
}
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableOfflineCacheAccess)) {
+ load_flags |= net::LOAD_CACHE_RETURN_IF_OFFLINE;
+ }
+
// Raw headers are sensitive, as they include Cookie/Set-Cookie, so only
// allow requesting them if requester has ReadRawCookies permission.
if ((load_flags & net::LOAD_REPORT_RAW_HEADERS)
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698