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

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

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