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

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

Issue 25772002: Allows prefetch requests to live beyond the renderer by delaying (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Asanka fixes. Made more general for future <a ping> support. Created 7 years, 2 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_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"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 int origin_pid, 44 int origin_pid,
45 int request_id, 45 int request_id,
46 bool is_main_frame, 46 bool is_main_frame,
47 int64 frame_id, 47 int64 frame_id,
48 bool parent_is_main_frame, 48 bool parent_is_main_frame,
49 int64 parent_frame_id, 49 int64 parent_frame_id,
50 ResourceType::Type resource_type, 50 ResourceType::Type resource_type,
51 PageTransition transition_type, 51 PageTransition transition_type,
52 bool is_download, 52 bool is_download,
53 bool is_stream, 53 bool is_stream,
54 bool is_detachable,
54 bool allow_download, 55 bool allow_download,
55 bool has_user_gesture, 56 bool has_user_gesture,
56 WebKit::WebReferrerPolicy referrer_policy, 57 WebKit::WebReferrerPolicy referrer_policy,
57 ResourceContext* context, 58 ResourceContext* context,
58 base::WeakPtr<ResourceMessageFilter> filter, 59 base::WeakPtr<ResourceMessageFilter> filter,
59 bool is_async); 60 bool is_async);
60 virtual ~ResourceRequestInfoImpl(); 61 virtual ~ResourceRequestInfoImpl();
61 62
62 // ResourceRequestInfo implementation: 63 // ResourceRequestInfo implementation:
63 virtual ResourceContext* GetContext() const OVERRIDE; 64 virtual ResourceContext* GetContext() const OVERRIDE;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 bool allow_download() const { return allow_download_; } 117 bool allow_download() const { return allow_download_; }
117 118
118 // Whether this is a download. 119 // Whether this is a download.
119 bool is_download() const { return is_download_; } 120 bool is_download() const { return is_download_; }
120 void set_is_download(bool download) { is_download_ = download; } 121 void set_is_download(bool download) { is_download_ = download; }
121 122
122 // Whether this is a stream. 123 // Whether this is a stream.
123 bool is_stream() const { return is_stream_; } 124 bool is_stream() const { return is_stream_; }
124 void set_is_stream(bool stream) { is_stream_ = stream; } 125 void set_is_stream(bool stream) { is_stream_ = stream; }
125 126
127 // Whether this is a detachable resource. Detachable resource requests can
128 // live beyond the life of the renderer.
asanka 2013/10/14 21:06:49 Nit: In practice this flag means the request is al
129 bool is_detachable() const { return is_detachable_; }
130 void set_is_detachable(bool is_detachable) { is_detachable_ = is_detachable; }
131
126 void set_was_ignored_by_handler(bool value) { 132 void set_was_ignored_by_handler(bool value) {
127 was_ignored_by_handler_ = value; 133 was_ignored_by_handler_ = value;
128 } 134 }
129 135
130 // The approximate in-memory size (bytes) that we credited this request 136 // The approximate in-memory size (bytes) that we credited this request
131 // as consuming in |outstanding_requests_memory_cost_map_|. 137 // as consuming in |outstanding_requests_memory_cost_map_|.
132 int memory_cost() const { return memory_cost_; } 138 int memory_cost() const { return memory_cost_; }
133 void set_memory_cost(int cost) { memory_cost_ = cost; } 139 void set_memory_cost(int cost) { memory_cost_ = cost; }
134 140
135 private: 141 private:
136 // Non-owning, may be NULL. 142 // Non-owning, may be NULL.
137 CrossSiteResourceHandler* cross_site_handler_; 143 CrossSiteResourceHandler* cross_site_handler_;
138 144
139 int process_type_; 145 int process_type_;
140 int child_id_; 146 int child_id_;
141 int route_id_; 147 int route_id_;
142 int origin_pid_; 148 int origin_pid_;
143 int request_id_; 149 int request_id_;
144 bool is_main_frame_; 150 bool is_main_frame_;
145 int64 frame_id_; 151 int64 frame_id_;
146 bool parent_is_main_frame_; 152 bool parent_is_main_frame_;
147 int64 parent_frame_id_; 153 int64 parent_frame_id_;
148 bool is_download_; 154 bool is_download_;
149 bool is_stream_; 155 bool is_stream_;
156 bool is_detachable_;
150 bool allow_download_; 157 bool allow_download_;
151 bool has_user_gesture_; 158 bool has_user_gesture_;
152 bool was_ignored_by_handler_; 159 bool was_ignored_by_handler_;
153 ResourceType::Type resource_type_; 160 ResourceType::Type resource_type_;
154 PageTransition transition_type_; 161 PageTransition transition_type_;
155 int memory_cost_; 162 int memory_cost_;
156 WebKit::WebReferrerPolicy referrer_policy_; 163 WebKit::WebReferrerPolicy referrer_policy_;
157 ResourceContext* context_; 164 ResourceContext* context_;
158 // The filter might be deleted without deleting this object if the process 165 // The filter might be deleted without deleting this object if the process
159 // exits during a transfer. 166 // exits during a transfer.
160 base::WeakPtr<ResourceMessageFilter> filter_; 167 base::WeakPtr<ResourceMessageFilter> filter_;
161 bool is_async_; 168 bool is_async_;
162 169
163 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); 170 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl);
164 }; 171 };
165 172
166 } // namespace content 173 } // namespace content
167 174
168 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ 175 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698