From 7783ad3f2317054bccfae7c0be3e4c8c65766a79 Mon Sep 17 00:00:00 2001 From: "evan@chromium.org" Date: Thu, 9 Dec 2010 22:30:15 +0000 Subject: appcache: document that the manifest parsing algorithm is fixed Otherwise, people (like me) will attempt to "moderize" this code and discover that it's fine the way it is. :~( TEST=compiles (just adding a comment) Review URL: http://codereview.chromium.org/5742002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68775 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/appcache/manifest_parser.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'webkit/appcache') diff --git a/webkit/appcache/manifest_parser.cc b/webkit/appcache/manifest_parser.cc index 68b37d8..49ddd8c 100644 --- a/webkit/appcache/manifest_parser.cc +++ b/webkit/appcache/manifest_parser.cc @@ -51,6 +51,13 @@ Manifest::~Manifest() {} bool ParseManifest(const GURL& manifest_url, const char* data, int length, 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 + // Do not modify it without consulting those docs. + // Though you might be tempted to convert these wstrings to UTF-8 or + // string16, this implementation seems simpler given the constraints. + static const std::wstring kSignature(L"CACHE MANIFEST"); DCHECK(manifest.explicit_urls.empty()); -- cgit v1.1