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 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "googleurl/src/gurl.h" | 11 #include "googleurl/src/gurl.h" |
12 #include "net/base/net_export.h" | 12 #include "net/base/net_export.h" |
13 #include "net/http/http_request_headers.h" | 13 #include "net/http/http_request_headers.h" |
14 | 14 |
15 namespace net { | 15 namespace net { |
16 | 16 |
17 class UploadDataStream; | 17 class UploadDataStream; |
18 | 18 |
19 struct NET_EXPORT 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 MOUSE_OVER_MOTIVATED, // Request was motivated by a preconnect |
| 29 // from link mouseover |
| 30 MOUSE_DOWN_MOTIVATED, // Request was motivated by a preconnect |
| 31 // from link mousedown |
| 32 TAP_UNCONFIRMED_MOTIVATED, // Request was motivated by a preconnect |
| 33 // from link unconfirmed tap |
| 34 TAP_DOWN_MOTIVATED, // Request was motivated by a preconnect |
| 35 // from link tapdown |
28 }; | 36 }; |
29 | 37 |
30 HttpRequestInfo(); | 38 HttpRequestInfo(); |
31 ~HttpRequestInfo(); | 39 ~HttpRequestInfo(); |
32 | 40 |
33 // The requested URL. | 41 // The requested URL. |
34 GURL url; | 42 GURL url; |
35 | 43 |
36 // The method to use (GET, POST, etc.). | 44 // The method to use (GET, POST, etc.). |
37 std::string method; | 45 std::string method; |
(...skipping 11 matching lines...) Expand all Loading... |
49 RequestMotivation motivation; | 57 RequestMotivation motivation; |
50 | 58 |
51 // An optional globally unique identifier for this request for use by the | 59 // An optional globally unique identifier for this request for use by the |
52 // consumer. 0 is invalid. | 60 // consumer. 0 is invalid. |
53 uint64 request_id; | 61 uint64 request_id; |
54 }; | 62 }; |
55 | 63 |
56 } // namespace net | 64 } // namespace net |
57 | 65 |
58 #endif // NET_HTTP_HTTP_REQUEST_INFO_H__ | 66 #endif // NET_HTTP_HTTP_REQUEST_INFO_H__ |
OLD | NEW |