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

Side by Side Diff: webkit/browser/appcache/manifest_parser.cc

Issue 19925003: WIP - command line experiment Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 const wchar_t* type_start = line_p; 255 const wchar_t* type_start = line_p;
256 while (line_p < line_end && *line_p != '\t' && *line_p != ' ') 256 while (line_p < line_end && *line_p != '\t' && *line_p != ' ')
257 ++line_p; 257 ++line_p;
258 258
259 // Look for a type value we understand, otherwise skip the line. 259 // Look for a type value we understand, otherwise skip the line.
260 InterceptVerb verb = UNKNOWN_VERB; 260 InterceptVerb verb = UNKNOWN_VERB;
261 std::wstring type(type_start, line_p - type_start); 261 std::wstring type(type_start, line_p - type_start);
262 if (type == L"return") { 262 if (type == L"return") {
263 verb = RETURN; 263 verb = RETURN;
264 } else if (type == L"execute" && 264 } else if (type == L"execute" &&
265 CommandLine::ForCurrentProcess()->HasSwitch( 265 CommandLine::ForCurrentProcess()->HasStringSwitch(
266 kEnableExecutableHandlers)) { 266 kEnableExecutableHandlers)) {
267 verb = EXECUTE; 267 verb = EXECUTE;
268 } 268 }
269 if (verb == UNKNOWN_VERB) 269 if (verb == UNKNOWN_VERB)
270 continue; 270 continue;
271 271
272 // Skip whitespace separating type from the target_url. 272 // Skip whitespace separating type from the target_url.
273 while (line_p < line_end && (*line_p == '\t' || *line_p == ' ')) 273 while (line_p < line_end && (*line_p == '\t' || *line_p == ' '))
274 ++line_p; 274 ++line_p;
275 275
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 fallback_url, is_pattern)); 361 fallback_url, is_pattern));
362 } else { 362 } else {
363 NOTREACHED(); 363 NOTREACHED();
364 } 364 }
365 } 365 }
366 366
367 return true; 367 return true;
368 } 368 }
369 369
370 } // namespace appcache 370 } // namespace appcache
OLDNEW
« no previous file with comments | « ui/message_center/message_center_switches.cc ('k') | webkit/common/appcache/appcache_interfaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698