1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef NET_HTTP_HTTP_REQUEST_INFO_H__ 6 #define NET_HTTP_HTTP_REQUEST_INFO_H__ 7 8 #include <string> 9 #include "base/ref_counted.h" 10 #include "googleurl/src/gurl.h" 11 #include "net/base/request_priority.h" 12 #include "net/base/upload_data.h" 13 14 namespace net { 15 16 class HttpRequestInfo { 17 public: HttpRequestInfo()18 HttpRequestInfo() : load_flags(0), priority(LOWEST) { 19 } 20 21 // The requested URL. 22 GURL url; 23 24 // The referring URL (if any). 25 GURL referrer; 26 27 // The method to use (GET, POST, etc.). 28 std::string method; 29 30 // The user agent string to use. TODO(darin): we should just add this to 31 // extra_headers 32 std::string user_agent; 33 34 // Any extra request headers (\r\n-delimited). 35 std::string extra_headers; 36 37 // Any upload data. 38 scoped_refptr<UploadData> upload_data; 39 40 // Any load flags (see load_flags.h). 41 int load_flags; 42 43 // The priority level for this request. 44 RequestPriority priority; 45 }; 46 47 } // namespace net 48 49 #endif // NET_HTTP_HTTP_REQUEST_INFO_H__ 50