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

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

Issue 352313003: Make it possible to set the HTTP origin header from content (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « Source/platform/exported/WebURLRequest.cpp ('k') | Source/platform/network/ResourceRequest.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) 2003, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
4 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. 4 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 void setHTTPContentType(const AtomicString& httpContentType) { setHTTPHeader Field("Content-Type", httpContentType); } 139 void setHTTPContentType(const AtomicString& httpContentType) { setHTTPHeader Field("Content-Type", httpContentType); }
140 140
141 const AtomicString& httpReferrer() const { return httpHeaderField("Referer") ; } 141 const AtomicString& httpReferrer() const { return httpHeaderField("Referer") ; }
142 ReferrerPolicy referrerPolicy() const { return m_referrerPolicy; } 142 ReferrerPolicy referrerPolicy() const { return m_referrerPolicy; }
143 void setHTTPReferrer(const Referrer& httpReferrer) { setHTTPHeaderField("Ref erer", httpReferrer.referrer); m_referrerPolicy = httpReferrer.referrerPolicy; } 143 void setHTTPReferrer(const Referrer& httpReferrer) { setHTTPHeaderField("Ref erer", httpReferrer.referrer); m_referrerPolicy = httpReferrer.referrerPolicy; }
144 void clearHTTPReferrer(); 144 void clearHTTPReferrer();
145 145
146 const AtomicString& httpOrigin() const { return httpHeaderField("Origin"); } 146 const AtomicString& httpOrigin() const { return httpHeaderField("Origin"); }
147 void setHTTPOrigin(const AtomicString& httpOrigin) { setHTTPHeaderField("Ori gin", httpOrigin); } 147 void setHTTPOrigin(const AtomicString& httpOrigin) { setHTTPHeaderField("Ori gin", httpOrigin); }
148 void clearHTTPOrigin(); 148 void clearHTTPOrigin();
149 void addHTTPOriginIfNeeded(const AtomicString& origin);
149 150
150 const AtomicString& httpUserAgent() const { return httpHeaderField("User-Age nt"); } 151 const AtomicString& httpUserAgent() const { return httpHeaderField("User-Age nt"); }
151 void setHTTPUserAgent(const AtomicString& httpUserAgent) { setHTTPHeaderFiel d("User-Agent", httpUserAgent); } 152 void setHTTPUserAgent(const AtomicString& httpUserAgent) { setHTTPHeaderFiel d("User-Agent", httpUserAgent); }
152 void clearHTTPUserAgent(); 153 void clearHTTPUserAgent();
153 154
154 const AtomicString& httpAccept() const { return httpHeaderField("Accept"); } 155 const AtomicString& httpAccept() const { return httpHeaderField("Accept"); }
155 void setHTTPAccept(const AtomicString& httpAccept) { setHTTPHeaderField("Acc ept", httpAccept); } 156 void setHTTPAccept(const AtomicString& httpAccept) { setHTTPHeaderField("Acc ept", httpAccept); }
156 157
157 FormData* httpBody() const; 158 FormData* httpBody() const;
158 void setHTTPBody(PassRefPtr<FormData> httpBody); 159 void setHTTPBody(PassRefPtr<FormData> httpBody);
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 int m_appCacheHostID; 275 int m_appCacheHostID;
275 ResourceRequest::TargetType m_targetType; 276 ResourceRequest::TargetType m_targetType;
276 ReferrerPolicy m_referrerPolicy; 277 ReferrerPolicy m_referrerPolicy;
277 }; 278 };
278 279
279 unsigned initializeMaximumHTTPConnectionCountPerHost(); 280 unsigned initializeMaximumHTTPConnectionCountPerHost();
280 281
281 } // namespace WebCore 282 } // namespace WebCore
282 283
283 #endif // ResourceRequest_h 284 #endif // ResourceRequest_h
OLDNEW
« no previous file with comments | « Source/platform/exported/WebURLRequest.cpp ('k') | Source/platform/network/ResourceRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698