summaryrefslogtreecommitdiffstats
path: root/webkit/appcache/manifest_parser.cc
diff options
context:
space:
mode:
authorjennb@chromium.org <jennb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-20 19:03:05 +0000
committerjennb@chromium.org <jennb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-20 19:03:05 +0000
commit499149c6dddfb863b3e2bbd8ef47d24a5da1227c (patch)
tree4b4933d0d87a6aa130654a159636708d5dfed45b /webkit/appcache/manifest_parser.cc
parente0d2dbb4ba1ddfb75681396b62f1326c169c27a4 (diff)
downloadchromium_src-499149c6dddfb863b3e2bbd8ef47d24a5da1227c.zip
chromium_src-499149c6dddfb863b3e2bbd8ef47d24a5da1227c.tar.gz
chromium_src-499149c6dddfb863b3e2bbd8ef47d24a5da1227c.tar.bz2
Change the enum style to use MACRO_STYLE rather than kConstant style to be consistent with chrome code base.
TEST=none BUG=none Review URL: http://codereview.chromium.org/174145 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23851 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/manifest_parser.cc')
-rw-r--r--webkit/appcache/manifest_parser.cc28
1 files changed, 14 insertions, 14 deletions
diff --git a/webkit/appcache/manifest_parser.cc b/webkit/appcache/manifest_parser.cc
index 7a93b39..4782ce5 100644
--- a/webkit/appcache/manifest_parser.cc
+++ b/webkit/appcache/manifest_parser.cc
@@ -38,10 +38,10 @@
namespace appcache {
enum Mode {
- kExplicit,
- kFallback,
- kOnlineWhitelist,
- kUnknown,
+ EXPLICIT,
+ FALLBACK,
+ ONLINE_WHITELIST,
+ UNKNOWN,
};
bool ParseManifest(const GURL& manifest_url, const char* data, int length,
@@ -53,7 +53,7 @@ bool ParseManifest(const GURL& manifest_url, const char* data, int length,
DCHECK(manifest.online_whitelist_namespaces.empty());
DCHECK(!manifest.online_whitelist_all);
- Mode mode = kExplicit;
+ Mode mode = EXPLICIT;
std::wstring data_string;
// TODO(jennb): cannot do UTF8ToWide(data, length, &data_string);
@@ -117,19 +117,19 @@ bool ParseManifest(const GURL& manifest_url, const char* data, int length,
std::wstring line(line_start, tmp - line_start + 1);
if (line == L"CACHE:") {
- mode = kExplicit;
+ mode = EXPLICIT;
} else if (line == L"FALLBACK:") {
- mode = kFallback;
+ mode = FALLBACK;
} else if (line == L"NETWORK:") {
- mode = kOnlineWhitelist;
+ mode = ONLINE_WHITELIST;
} else if (*(line.end() - 1) == ':') {
- mode = kUnknown;
- } else if (mode == kUnknown) {
+ mode = UNKNOWN;
+ } else if (mode == UNKNOWN) {
continue;
- } else if (line == L"*" && mode == kOnlineWhitelist) {
+ } else if (line == L"*" && mode == ONLINE_WHITELIST) {
manifest.online_whitelist_all = true;
continue;
- } else if (mode == kExplicit || mode == kOnlineWhitelist) {
+ } else if (mode == EXPLICIT || mode == ONLINE_WHITELIST) {
const wchar_t *line_p = line.c_str();
const wchar_t *line_end = line_p + line.length();
@@ -153,12 +153,12 @@ bool ParseManifest(const GURL& manifest_url, const char* data, int length,
continue;
}
- if (mode == kExplicit) {
+ if (mode == EXPLICIT) {
manifest.explicit_urls.insert(url.spec());
} else {
manifest.online_whitelist_namespaces.push_back(url);
}
- } else if (mode == kFallback) {
+ } else if (mode == FALLBACK) {
const wchar_t* line_p = line.c_str();
const wchar_t* line_end = line_p + line.length();