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

Side by Side Diff: Source/core/platform/network/HTTPParsers.cpp

Issue 22572005: Remove all uses of the ASCIILiteral class. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rm it from wtf Created 7 years, 4 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 /* 1 /*
2 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 2 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
3 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
4 * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 4 * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
5 * Copyright (C) 2009 Google Inc. All rights reserved. 5 * Copyright (C) 2009 Google Inc. All rights reserved.
6 * Copyright (C) 2011 Apple Inc. All Rights Reserved. 6 * Copyright (C) 2011 Apple Inc. All Rights Reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 ++endpos; 347 ++endpos;
348 348
349 charsetPos = pos; 349 charsetPos = pos;
350 charsetLen = endpos - pos; 350 charsetLen = endpos - pos;
351 return; 351 return;
352 } 352 }
353 } 353 }
354 354
355 ContentSecurityPolicy::ReflectedXSSDisposition parseXSSProtectionHeader(const St ring& header, String& failureReason, unsigned& failurePosition, String& reportUR L) 355 ContentSecurityPolicy::ReflectedXSSDisposition parseXSSProtectionHeader(const St ring& header, String& failureReason, unsigned& failurePosition, String& reportUR L)
356 { 356 {
357 DEFINE_STATIC_LOCAL(String, failureReasonInvalidToggle, (ASCIILiteral("expec ted 0 or 1"))); 357 DEFINE_STATIC_LOCAL(String, failureReasonInvalidToggle, ("expected 0 or 1")) ;
358 DEFINE_STATIC_LOCAL(String, failureReasonInvalidSeparator, (ASCIILiteral("ex pected semicolon"))); 358 DEFINE_STATIC_LOCAL(String, failureReasonInvalidSeparator, ("expected semico lon"));
359 DEFINE_STATIC_LOCAL(String, failureReasonInvalidEquals, (ASCIILiteral("expec ted equals sign"))); 359 DEFINE_STATIC_LOCAL(String, failureReasonInvalidEquals, ("expected equals si gn"));
360 DEFINE_STATIC_LOCAL(String, failureReasonInvalidMode, (ASCIILiteral("invalid mode directive"))); 360 DEFINE_STATIC_LOCAL(String, failureReasonInvalidMode, ("invalid mode directi ve"));
361 DEFINE_STATIC_LOCAL(String, failureReasonInvalidReport, (ASCIILiteral("inval id report directive"))); 361 DEFINE_STATIC_LOCAL(String, failureReasonInvalidReport, ("invalid report dir ective"));
362 DEFINE_STATIC_LOCAL(String, failureReasonDuplicateMode, (ASCIILiteral("dupli cate mode directive"))); 362 DEFINE_STATIC_LOCAL(String, failureReasonDuplicateMode, ("duplicate mode dir ective"));
363 DEFINE_STATIC_LOCAL(String, failureReasonDuplicateReport, (ASCIILiteral("dup licate report directive"))); 363 DEFINE_STATIC_LOCAL(String, failureReasonDuplicateReport, ("duplicate report directive"));
364 DEFINE_STATIC_LOCAL(String, failureReasonInvalidDirective, (ASCIILiteral("un recognized directive"))); 364 DEFINE_STATIC_LOCAL(String, failureReasonInvalidDirective, ("unrecognized di rective"));
365 365
366 unsigned pos = 0; 366 unsigned pos = 0;
367 367
368 if (!skipWhiteSpace(header, pos, false)) 368 if (!skipWhiteSpace(header, pos, false))
369 return ContentSecurityPolicy::ReflectedXSSUnset; 369 return ContentSecurityPolicy::ReflectedXSSUnset;
370 370
371 if (header[pos] == '0') 371 if (header[pos] == '0')
372 return ContentSecurityPolicy::AllowReflectedXSS; 372 return ContentSecurityPolicy::AllowReflectedXSS;
373 373
374 if (header[pos++] != '1') { 374 if (header[pos++] != '1') {
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 678
679 size_t parseHTTPRequestBody(const char* data, size_t length, Vector<unsigned cha r>& body) 679 size_t parseHTTPRequestBody(const char* data, size_t length, Vector<unsigned cha r>& body)
680 { 680 {
681 body.clear(); 681 body.clear();
682 body.append(data, length); 682 body.append(data, length);
683 683
684 return length; 684 return length;
685 } 685 }
686 686
687 } 687 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698