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

Side by Side Diff: third_party/WebKit/Source/platform/network/HTTPParsers.cpp

Issue 2657443005: Migrate WTF::HashSet::add() to ::insert() [part 1 of N] (Closed)
Patch Set: Created 3 years, 11 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 /* 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 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 pragmaValue.lower().contains(noCacheDirective); 757 pragmaValue.lower().contains(noCacheDirective);
758 } 758 }
759 return cacheControlHeader; 759 return cacheControlHeader;
760 } 760 }
761 761
762 void parseCommaDelimitedHeader(const String& headerValue, 762 void parseCommaDelimitedHeader(const String& headerValue,
763 CommaDelimitedHeaderSet& headerSet) { 763 CommaDelimitedHeaderSet& headerSet) {
764 Vector<String> results; 764 Vector<String> results;
765 headerValue.split(",", results); 765 headerValue.split(",", results);
766 for (auto& value : results) 766 for (auto& value : results)
767 headerSet.add(value.stripWhiteSpace(isWhitespace)); 767 headerSet.insert(value.stripWhiteSpace(isWhitespace));
768 } 768 }
769 769
770 bool parseSuboriginHeader(const String& header, 770 bool parseSuboriginHeader(const String& header,
771 Suborigin* suborigin, 771 Suborigin* suborigin,
772 WTF::Vector<String>& messages) { 772 WTF::Vector<String>& messages) {
773 Vector<String> headers; 773 Vector<String> headers;
774 header.split(',', true, headers); 774 header.split(',', true, headers);
775 775
776 if (headers.size() > 1) 776 if (headers.size() > 1)
777 messages.push_back( 777 messages.push_back(
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 StringBuilder sb; 870 StringBuilder sb;
871 sb.append("["); 871 sb.append("[");
872 sb.append(header); 872 sb.append(header);
873 sb.append("]"); 873 sb.append("]");
874 std::unique_ptr<JSONValue> headerValue = 874 std::unique_ptr<JSONValue> headerValue =
875 parseJSON(sb.toString(), maxParseDepth); 875 parseJSON(sb.toString(), maxParseDepth);
876 return JSONArray::from(std::move(headerValue)); 876 return JSONArray::from(std::move(headerValue));
877 } 877 }
878 878
879 } // namespace blink 879 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698