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

Unified Diff: chrome/browser/search/local_ntp_source.cc

Issue 2533203002: New Tab Page: chrome-search://local-ntp/ files should not be cachable (Closed)
Patch Set: comment Created 4 years 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/search/local_ntp_source.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/local_ntp_source.cc
diff --git a/chrome/browser/search/local_ntp_source.cc b/chrome/browser/search/local_ntp_source.cc
index b192b0beb166311c2e3ca3e34e39ec621764857f..963f3d9d887dd874d96727147a1232772d1a905d 100644
--- a/chrome/browser/search/local_ntp_source.cc
+++ b/chrome/browser/search/local_ntp_source.cc
@@ -250,6 +250,14 @@ std::string LocalNtpSource::GetMimeType(
return std::string();
}
+bool LocalNtpSource::AllowCaching() const {
+ // Some resources served by LocalNtpSource, i.e. config.js, are dynamically
+ // generated and could differ on each access. To avoid using old cached
+ // content on reload, disallow caching here. Otherwise, it fails to reflect
+ // newly revised user configurations in the page.
+ return false;
+}
+
bool LocalNtpSource::ShouldServiceRequest(
const net::URLRequest* request) const {
DCHECK(request->url().host_piece() == chrome::kChromeSearchLocalNtpHost);
« no previous file with comments | « chrome/browser/search/local_ntp_source.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698