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

Side by Side Diff: content/public/browser/resource_request_details.h

Issue 16514008: Add metrics for calculating precision/recall of link navigation pre-connect triggers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments / remove leftover pritnfs Created 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_DETAILS_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_DETAILS_H_
6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_DETAILS_H_ 6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_DETAILS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "content/public/common/page_transition_types.h"
10 #include "googleurl/src/gurl.h" 11 #include "googleurl/src/gurl.h"
11 #include "net/cert/cert_status_flags.h" 12 #include "net/cert/cert_status_flags.h"
12 #include "net/base/host_port_pair.h" 13 #include "net/base/host_port_pair.h"
13 #include "net/url_request/url_request_status.h" 14 #include "net/url_request/url_request_status.h"
14 #include "webkit/glue/resource_type.h" 15 #include "webkit/glue/resource_type.h"
15 16
16 namespace net { 17 namespace net {
17 class URLRequest; 18 class URLRequest;
18 } 19 }
19 20
20 namespace content { 21 namespace content {
21 22
22 // The ResourceRequestDetails object contains additional details about a 23 // The ResourceRequestDetails object contains additional details about a
23 // resource request notification. It copies many of the publicly accessible 24 // resource request notification. It copies many of the publicly accessible
24 // member variables of net::URLRequest, but exists on the UI thread. 25 // member variables of net::URLRequest, but exists on the UI thread.
25 struct ResourceRequestDetails { 26 struct ResourceRequestDetails {
26 ResourceRequestDetails(const net::URLRequest* request, int cert_id); 27 ResourceRequestDetails(const net::URLRequest* request,
28 int cert_id,
29 PageTransition transition);
27 30
28 virtual ~ResourceRequestDetails(); 31 virtual ~ResourceRequestDetails();
29 32
30 GURL url; 33 GURL url;
31 GURL original_url; 34 GURL original_url;
32 std::string method; 35 std::string method;
33 std::string referrer; 36 std::string referrer;
34 bool has_upload; 37 bool has_upload;
35 int load_flags; 38 int load_flags;
36 int origin_child_id; 39 int origin_child_id;
37 int origin_route_id; 40 int origin_route_id;
38 net::URLRequestStatus status; 41 net::URLRequestStatus status;
39 int ssl_cert_id; 42 int ssl_cert_id;
40 net::CertStatus ssl_cert_status; 43 net::CertStatus ssl_cert_status;
41 ResourceType::Type resource_type; 44 ResourceType::Type resource_type;
42 net::HostPortPair socket_address; 45 net::HostPortPair socket_address;
43 int64 frame_id; 46 int64 frame_id;
47 PageTransition page_transition;
44 }; 48 };
45 49
46 // Details about a redirection of a resource request. 50 // Details about a redirection of a resource request.
47 struct ResourceRedirectDetails : public ResourceRequestDetails { 51 struct ResourceRedirectDetails : public ResourceRequestDetails {
jar (doing other things) 2013/06/18 01:33:49 nit: These should probably be classes. By the tim
kouhei (in TOK) 2013/06/18 22:28:41 I'd like to address this in separate CL.
48 ResourceRedirectDetails(const net::URLRequest* request, 52 ResourceRedirectDetails(const net::URLRequest* request,
49 int cert_id, 53 int cert_id,
54 PageTransition transition,
50 const GURL& new_url); 55 const GURL& new_url);
51 virtual ~ResourceRedirectDetails(); 56 virtual ~ResourceRedirectDetails();
52 57
53 // The URL to which we are being redirected. 58 // The URL to which we are being redirected.
54 GURL new_url; 59 GURL new_url;
55 }; 60 };
56 61
57 } // namespace content 62 } // namespace content
58 63
59 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_DETAILS_H_ 64 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_DETAILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698