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

Unified Diff: webkit/browser/appcache/manifest_parser.cc

Issue 276093003: appcache content-type check (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
Index: webkit/browser/appcache/manifest_parser.cc
diff --git a/webkit/browser/appcache/manifest_parser.cc b/webkit/browser/appcache/manifest_parser.cc
index 5735fe4b6bc874279b7e8f4a4b41f375a19c126b..fa38ca92f5381b8f8d1f0e387b8a0ac0673833a1 100644
--- a/webkit/browser/appcache/manifest_parser.cc
+++ b/webkit/browser/appcache/manifest_parser.cc
@@ -75,7 +75,7 @@ Manifest::Manifest() : online_whitelist_all(false) {}
Manifest::~Manifest() {}
bool ParseManifest(const GURL& manifest_url, const char* data, int length,
- Manifest& manifest) {
+ bool allow_intercepts, Manifest& manifest) {
// This is an implementation of the parsing algorithm specified in
// the HTML5 offline web application docs:
// http://www.w3.org/TR/html5/offline.html
@@ -218,6 +218,9 @@ bool ParseManifest(const GURL& manifest_url, const char* data, int length,
Namespace(NETWORK_NAMESPACE, url, GURL(), is_pattern));
}
} else if (mode == INTERCEPT) {
+ if (!allow_intercepts)
+ continue;
+
// Lines of the form,
// <urlnamespace> <intercept_type> <targeturl>
const wchar_t* line_p = line.c_str();
« webkit/browser/appcache/manifest_parser.h ('K') | « webkit/browser/appcache/manifest_parser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698