[Android WebView] Fix webview perf bot switchover to use org.chromium.webview_shell...
[chromium-blink-merge.git] / content / public / browser / resource_request_details.h
blobf776f4da7661c333cedc8a0a40d6644f7b1250d9
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_DETAILS_H_
6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_DETAILS_H_
8 #include <string>
10 #include "content/public/common/resource_type.h"
11 #include "net/base/host_port_pair.h"
12 #include "net/cert/cert_status_flags.h"
13 #include "net/url_request/url_request_status.h"
14 #include "url/gurl.h"
16 namespace net {
17 class URLRequest;
20 namespace content {
22 // The ResourceRequestDetails object contains additional details about a
23 // resource request notification. It copies many of the publicly accessible
24 // member variables of net::URLRequest, but exists on the UI thread.
25 struct ResourceRequestDetails {
26 ResourceRequestDetails(const net::URLRequest* request, int cert_id);
28 virtual ~ResourceRequestDetails();
30 GURL url;
31 GURL original_url;
32 std::string method;
33 std::string referrer;
34 bool has_upload;
35 int load_flags;
36 int origin_child_id;
37 net::URLRequestStatus status;
38 int ssl_cert_id;
39 net::CertStatus ssl_cert_status;
40 ResourceType resource_type;
41 net::HostPortPair socket_address;
42 int render_frame_id;
43 // HTTP response code. See HttpResponseHeaders::response_code().
44 // -1 if there are no response headers yet.
45 int http_response_code;
48 // Details about a redirection of a resource request.
49 struct ResourceRedirectDetails : public ResourceRequestDetails {
50 ResourceRedirectDetails(const net::URLRequest* request,
51 int cert_id,
52 const GURL& new_url);
53 ~ResourceRedirectDetails() override;
55 // The URL to which we are being redirected.
56 GURL new_url;
59 } // namespace content
61 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_DETAILS_H_