OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_HTTP_HTTP_REQUEST_INFO_H__ | 5 #ifndef NET_HTTP_HTTP_REQUEST_INFO_H__ |
6 #define NET_HTTP_HTTP_REQUEST_INFO_H__ | 6 #define NET_HTTP_HTTP_REQUEST_INFO_H__ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "googleurl/src/gurl.h" | 11 #include "googleurl/src/gurl.h" |
12 #include "net/base/net_api.h" | 12 #include "net/base/net_export.h" |
13 #include "net/base/request_priority.h" | 13 #include "net/base/request_priority.h" |
14 #include "net/base/upload_data.h" | 14 #include "net/base/upload_data.h" |
15 #include "net/http/http_request_headers.h" | 15 #include "net/http/http_request_headers.h" |
16 | 16 |
17 namespace net { | 17 namespace net { |
18 | 18 |
19 struct NET_API HttpRequestInfo { | 19 struct NET_EXPORT HttpRequestInfo { |
20 enum RequestMotivation{ | 20 enum RequestMotivation{ |
21 // TODO(mbelshe): move these into Client Socket. | 21 // TODO(mbelshe): move these into Client Socket. |
22 PRECONNECT_MOTIVATED, // Request was motivated by a prefetch. | 22 PRECONNECT_MOTIVATED, // Request was motivated by a prefetch. |
23 OMNIBOX_MOTIVATED, // Request was motivated by the omnibox. | 23 OMNIBOX_MOTIVATED, // Request was motivated by the omnibox. |
24 NORMAL_MOTIVATION, // No special motivation associated with the request. | 24 NORMAL_MOTIVATION, // No special motivation associated with the request. |
25 EARLY_LOAD_MOTIVATED, // When browser asks a tab to open an URL, this short | 25 EARLY_LOAD_MOTIVATED, // When browser asks a tab to open an URL, this short |
26 // circuits that path (of waiting for the renderer to | 26 // circuits that path (of waiting for the renderer to |
27 // do the URL request), and starts loading ASAP. | 27 // do the URL request), and starts loading ASAP. |
28 }; | 28 }; |
29 | 29 |
(...skipping 22 matching lines...) Expand all Loading... |
52 RequestMotivation motivation; | 52 RequestMotivation motivation; |
53 | 53 |
54 // An optional globally unique identifier for this request for use by the | 54 // An optional globally unique identifier for this request for use by the |
55 // consumer. 0 is invalid. | 55 // consumer. 0 is invalid. |
56 uint64 request_id; | 56 uint64 request_id; |
57 }; | 57 }; |
58 | 58 |
59 } // namespace net | 59 } // namespace net |
60 | 60 |
61 #endif // NET_HTTP_HTTP_REQUEST_INFO_H__ | 61 #endif // NET_HTTP_HTTP_REQUEST_INFO_H__ |
OLD | NEW |