Added #ifdefs around PrintHeaderAndFooter for Windows and Mac.
[chromium-blink-merge.git] / net / http / http_request_info.h
bloba587a421b5854d1d3405aeb359d03d4e4af495d7
1 // Copyright (c) 2011 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.
5 #ifndef NET_HTTP_HTTP_REQUEST_INFO_H__
6 #define NET_HTTP_HTTP_REQUEST_INFO_H__
8 #include <string>
10 #include "base/basictypes.h"
11 #include "net/base/net_export.h"
12 #include "net/base/privacy_mode.h"
13 #include "net/http/http_request_headers.h"
14 #include "url/gurl.h"
16 namespace net {
18 class UploadDataStream;
20 struct NET_EXPORT HttpRequestInfo {
21 enum RequestMotivation{
22 // TODO(mbelshe): move these into Client Socket.
23 PRECONNECT_MOTIVATED, // Request was motivated by a prefetch.
24 OMNIBOX_MOTIVATED, // Request was motivated by the omnibox.
25 NORMAL_MOTIVATION, // No special motivation associated with the request.
26 EARLY_LOAD_MOTIVATED, // When browser asks a tab to open an URL, this short
27 // circuits that path (of waiting for the renderer to
28 // do the URL request), and starts loading ASAP.
31 HttpRequestInfo();
32 ~HttpRequestInfo();
34 // The requested URL.
35 GURL url;
37 // The method to use (GET, POST, etc.).
38 std::string method;
40 // Any extra request headers (including User-Agent).
41 HttpRequestHeaders extra_headers;
43 // Any upload data.
44 UploadDataStream* upload_data_stream;
46 // Any load flags (see load_flags.h).
47 int load_flags;
49 // The motivation behind this request.
50 RequestMotivation motivation;
52 // If enabled, then request must be sent over connection that cannot be
53 // tracked by the server (e.g. without channel id).
54 PrivacyMode privacy_mode;
57 } // namespace net
59 #endif // NET_HTTP_HTTP_REQUEST_INFO_H__