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

Side by Side Diff: content/browser/appcache/appcache_manifest_parser.cc

Issue 548373002: Rename AppCache's Manifest to AppCacheManifest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // This is a port of ManifestParser.cc from WebKit/WebCore/loader/appcache. 5 // This is a port of ManifestParser.cc from WebKit/WebCore/loader/appcache.
6 6
7 /* 7 /*
8 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 8 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 ONLINE_WHITELIST, 63 ONLINE_WHITELIST,
64 UNKNOWN_MODE, 64 UNKNOWN_MODE,
65 }; 65 };
66 66
67 enum InterceptVerb { 67 enum InterceptVerb {
68 RETURN, 68 RETURN,
69 EXECUTE, 69 EXECUTE,
70 UNKNOWN_VERB, 70 UNKNOWN_VERB,
71 }; 71 };
72 72
73 Manifest::Manifest() 73 AppCacheManifest::AppCacheManifest()
74 : online_whitelist_all(false), 74 : online_whitelist_all(false),
75 did_ignore_intercept_namespaces(false) { 75 did_ignore_intercept_namespaces(false) {
76 } 76 }
77 77
78 Manifest::~Manifest() {} 78 AppCacheManifest::~AppCacheManifest() {}
79 79
80 bool ParseManifest(const GURL& manifest_url, const char* data, int length, 80 bool ParseManifest(const GURL& manifest_url, const char* data, int length,
81 ParseMode parse_mode, Manifest& manifest) { 81 ParseMode parse_mode, AppCacheManifest& manifest) {
82 // This is an implementation of the parsing algorithm specified in 82 // This is an implementation of the parsing algorithm specified in
83 // the HTML5 offline web application docs: 83 // the HTML5 offline web application docs:
84 // http://www.w3.org/TR/html5/offline.html 84 // http://www.w3.org/TR/html5/offline.html
85 // Do not modify it without consulting those docs. 85 // Do not modify it without consulting those docs.
86 // Though you might be tempted to convert these wstrings to UTF-8 or 86 // Though you might be tempted to convert these wstrings to UTF-8 or
87 // base::string16, this implementation seems simpler given the constraints. 87 // base::string16, this implementation seems simpler given the constraints.
88 88
89 const wchar_t kSignature[] = L"CACHE MANIFEST"; 89 const wchar_t kSignature[] = L"CACHE MANIFEST";
90 const size_t kSignatureLength = arraysize(kSignature) - 1; 90 const size_t kSignatureLength = arraysize(kSignature) - 1;
91 const wchar_t kChromiumSignature[] = L"CHROMIUM CACHE MANIFEST"; 91 const wchar_t kChromiumSignature[] = L"CHROMIUM CACHE MANIFEST";
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 fallback_url, is_pattern)); 373 fallback_url, is_pattern));
374 } else { 374 } else {
375 NOTREACHED(); 375 NOTREACHED();
376 } 376 }
377 } 377 }
378 378
379 return true; 379 return true;
380 } 380 }
381 381
382 } // namespace content 382 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/appcache/appcache_manifest_parser.h ('k') | content/browser/appcache/appcache_manifest_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698