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

Side by Side Diff: Source/platform/network/HTTPRequest.h

Issue 99733002: Update HTTPHeaderMap wrappers to use AtomicString type for header values (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 7 years 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
« no previous file with comments | « Source/platform/network/HTTPParsers.cpp ('k') | Source/platform/network/HTTPRequest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All Rights Reserved. 3 * Copyright (C) 2011 Apple Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 String requestMethod() const { return m_requestMethod; } 52 String requestMethod() const { return m_requestMethod; }
53 void setRequestMethod(const String& method) { m_requestMethod = method; } 53 void setRequestMethod(const String& method) { m_requestMethod = method; }
54 54
55 KURL url() const { return m_url; } 55 KURL url() const { return m_url; }
56 void setURL(const KURL& url) { m_url = url; } 56 void setURL(const KURL& url) { m_url = url; }
57 57
58 const Vector<unsigned char>& body() const { return m_body; } 58 const Vector<unsigned char>& body() const { return m_body; }
59 59
60 const HTTPHeaderMap& headerFields() const { return m_headerFields; } 60 const HTTPHeaderMap& headerFields() const { return m_headerFields; }
61 void addHeaderField(const AtomicString& name, const String& value) { m_heade rFields.add(name, value); } 61 void addHeaderField(const AtomicString& name, const AtomicString& value) { m _headerFields.add(name, value); }
62 void addHeaderField(const char* name, const String& value) { m_headerFields. add(name, value); } 62 void addHeaderField(const char* name, const AtomicString& value) { m_headerF ields.add(name, value); }
63 63
64 protected: 64 protected:
65 HTTPRequest(); 65 HTTPRequest();
66 HTTPRequest(const String& requestMethod, const KURL&, HTTPVersion); 66 HTTPRequest(const String& requestMethod, const KURL&, HTTPVersion);
67 67
68 // Parsing helpers. 68 // Parsing helpers.
69 size_t parseRequestLine(const char* data, size_t length, String& failureReas on); 69 size_t parseRequestLine(const char* data, size_t length, String& failureReas on);
70 size_t parseHeaders(const char* data, size_t length, String& failureReason); 70 size_t parseHeaders(const char* data, size_t length, String& failureReason);
71 size_t parseRequestBody(const char* data, size_t length); 71 size_t parseRequestBody(const char* data, size_t length);
72 72
73 KURL m_url; 73 KURL m_url;
74 HTTPVersion m_httpVersion; 74 HTTPVersion m_httpVersion;
75 String m_requestMethod; 75 String m_requestMethod;
76 HTTPHeaderMap m_headerFields; 76 HTTPHeaderMap m_headerFields;
77 Vector<unsigned char> m_body; 77 Vector<unsigned char> m_body;
78 }; 78 };
79 79
80 } // namespace WebCore 80 } // namespace WebCore
81 81
82 #endif // HTTPRequest_h 82 #endif // HTTPRequest_h
OLDNEW
« no previous file with comments | « Source/platform/network/HTTPParsers.cpp ('k') | Source/platform/network/HTTPRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698