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

Side by Side Diff: chrome/browser/renderer_host/resource_request_details.h

Issue 6532073: Move core pieces of browser\renderer_host to src\content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 | Annotate | Revision Log
OLDNEW
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 // The ResourceRequestDetails object contains additional details about a
6 // resource request. It copies many of the publicly accessible member variables
7 // of net::URLRequest, but exists on the UI thread.
8
9 #ifndef CHROME_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_DETAILS_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_DETAILS_H_
10 #define CHROME_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_DETAILS_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_DETAILS_H_
11 #pragma once 7 #pragma once
12 8
13 #include <string> 9 // TODO(jam): remove this file when all files have been converted.
14 10 #include "content/browser/renderer_host/resource_request_details.h"
15 #include "googleurl/src/gurl.h"
16 #include "net/url_request/url_request_status.h"
17 #include "webkit/glue/resource_type.h"
18
19 namespace net {
20 class URLRequest;
21 } // namespace net
22
23 // Details about a resource request notification.
24 class ResourceRequestDetails {
25 public:
26 ResourceRequestDetails(const net::URLRequest* request, int cert_id);
27
28 virtual ~ResourceRequestDetails();
29
30 const GURL& url() const { return url_; }
31 const GURL& original_url() const { return original_url_; }
32 const std::string& method() const { return method_; }
33 const std::string& referrer() const { return referrer_; }
34 bool has_upload() const { return has_upload_; }
35 int load_flags() const { return load_flags_; }
36 int origin_child_id() const { return origin_child_id_; }
37 const net::URLRequestStatus& status() const { return status_; }
38 int ssl_cert_id() const { return ssl_cert_id_; }
39 int ssl_cert_status() const { return ssl_cert_status_; }
40 ResourceType::Type resource_type() const { return resource_type_; }
41
42 private:
43 GURL url_;
44 GURL original_url_;
45 std::string method_;
46 std::string referrer_;
47 bool has_upload_;
48 int load_flags_;
49 int origin_child_id_;
50 net::URLRequestStatus status_;
51 int ssl_cert_id_;
52 int ssl_cert_status_;
53 ResourceType::Type resource_type_;
54 };
55
56 // Details about a redirection of a resource request.
57 class ResourceRedirectDetails : public ResourceRequestDetails {
58 public:
59 ResourceRedirectDetails(const net::URLRequest* request,
60 int cert_id,
61 const GURL& new_url);
62 virtual ~ResourceRedirectDetails();
63
64 // The URL to which we are being redirected.
65 const GURL& new_url() const { return new_url_; }
66
67 private:
68 GURL new_url_;
69 };
70 11
71 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_DETAILS_H_ 12 #endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_DETAILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698