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

Side by Side Diff: content/browser/loader/resource_request_info_impl.h

Issue 23223003: Chromium Blob hacking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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) 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_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ 5 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_
6 #define CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ 6 #define CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/supports_user_data.h" 13 #include "base/supports_user_data.h"
14 #include "content/public/browser/resource_request_info.h" 14 #include "content/public/browser/resource_request_info.h"
15 #include "content/public/common/referrer.h" 15 #include "content/public/common/referrer.h"
16 #include "net/base/load_states.h" 16 #include "net/base/load_states.h"
17 #include "webkit/common/resource_type.h" 17 #include "webkit/common/resource_type.h"
18 18
19 namespace webkit_blob {
20 class BlobData;
21 }
22
23 namespace content { 19 namespace content {
24 class CrossSiteResourceHandler; 20 class CrossSiteResourceHandler;
25 class ResourceContext; 21 class ResourceContext;
26 struct GlobalRequestID; 22 struct GlobalRequestID;
27 struct GlobalRoutingID; 23 struct GlobalRoutingID;
28 24
29 // Holds the data ResourceDispatcherHost associates with each request. 25 // Holds the data ResourceDispatcherHost associates with each request.
30 // Retrieve this data by calling ResourceDispatcherHost::InfoForRequest. 26 // Retrieve this data by calling ResourceDispatcherHost::InfoForRequest.
31 class ResourceRequestInfoImpl : public ResourceRequestInfo, 27 class ResourceRequestInfoImpl : public ResourceRequestInfo,
32 public base::SupportsUserData::Data { 28 public base::SupportsUserData::Data {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 105
110 void set_was_ignored_by_handler(bool value) { 106 void set_was_ignored_by_handler(bool value) {
111 was_ignored_by_handler_ = value; 107 was_ignored_by_handler_ = value;
112 } 108 }
113 109
114 // The approximate in-memory size (bytes) that we credited this request 110 // The approximate in-memory size (bytes) that we credited this request
115 // as consuming in |outstanding_requests_memory_cost_map_|. 111 // as consuming in |outstanding_requests_memory_cost_map_|.
116 int memory_cost() const { return memory_cost_; } 112 int memory_cost() const { return memory_cost_; }
117 void set_memory_cost(int cost) { memory_cost_ = cost; } 113 void set_memory_cost(int cost) { memory_cost_ = cost; }
118 114
119 // We hold a reference to the requested blob data to ensure it doesn't
120 // get finally released prior to the net::URLRequestJob being started.
121 webkit_blob::BlobData* requested_blob_data() const {
122 return requested_blob_data_.get();
123 }
124 void set_requested_blob_data(webkit_blob::BlobData* data);
125
126 private: 115 private:
127 // Non-owning, may be NULL. 116 // Non-owning, may be NULL.
128 CrossSiteResourceHandler* cross_site_handler_; 117 CrossSiteResourceHandler* cross_site_handler_;
129 118
130 int process_type_; 119 int process_type_;
131 int child_id_; 120 int child_id_;
132 int route_id_; 121 int route_id_;
133 int origin_pid_; 122 int origin_pid_;
134 int request_id_; 123 int request_id_;
135 bool is_main_frame_; 124 bool is_main_frame_;
136 int64 frame_id_; 125 int64 frame_id_;
137 bool parent_is_main_frame_; 126 bool parent_is_main_frame_;
138 int64 parent_frame_id_; 127 int64 parent_frame_id_;
139 bool is_download_; 128 bool is_download_;
140 bool is_stream_; 129 bool is_stream_;
141 bool allow_download_; 130 bool allow_download_;
142 bool has_user_gesture_; 131 bool has_user_gesture_;
143 bool was_ignored_by_handler_; 132 bool was_ignored_by_handler_;
144 ResourceType::Type resource_type_; 133 ResourceType::Type resource_type_;
145 PageTransition transition_type_; 134 PageTransition transition_type_;
146 int memory_cost_; 135 int memory_cost_;
147 scoped_refptr<webkit_blob::BlobData> requested_blob_data_;
148 WebKit::WebReferrerPolicy referrer_policy_; 136 WebKit::WebReferrerPolicy referrer_policy_;
149 ResourceContext* context_; 137 ResourceContext* context_;
150 bool is_async_; 138 bool is_async_;
151 139
152 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); 140 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl);
153 }; 141 };
154 142
155 } // namespace content 143 } // namespace content
156 144
157 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ 145 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | content/browser/loader/resource_request_info_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698