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

Side by Side Diff: content/browser/renderer_host/resource_dispatcher_host_request_info.h

Issue 7624031: Treat files downloaded from the address bar as "always safe" (including extensions per discussion... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/time.h" 12 #include "base/time.h"
13 #include "content/common/child_process_info.h" 13 #include "content/common/child_process_info.h"
14 #include "content/common/page_transition_types.h"
14 #include "net/base/load_states.h" 15 #include "net/base/load_states.h"
15 #include "net/url_request/url_request.h" 16 #include "net/url_request/url_request.h"
16 #include "webkit/glue/resource_type.h" 17 #include "webkit/glue/resource_type.h"
17 18
18 class CrossSiteResourceHandler; 19 class CrossSiteResourceHandler;
19 class LoginHandler; 20 class LoginHandler;
20 class ResourceDispatcherHost; 21 class ResourceDispatcherHost;
21 class ResourceDispatcherHostLoginDelegate; 22 class ResourceDispatcherHostLoginDelegate;
22 class ResourceHandler; 23 class ResourceHandler;
23 class SSLClientAuthHandler; 24 class SSLClientAuthHandler;
(...skipping 14 matching lines...) Expand all
38 ResourceDispatcherHostRequestInfo( 39 ResourceDispatcherHostRequestInfo(
39 ResourceHandler* handler, 40 ResourceHandler* handler,
40 ChildProcessInfo::ProcessType process_type, 41 ChildProcessInfo::ProcessType process_type,
41 int child_id, 42 int child_id,
42 int route_id, 43 int route_id,
43 int origin_pid, 44 int origin_pid,
44 int request_id, 45 int request_id,
45 bool is_main_frame, 46 bool is_main_frame,
46 int64 frame_id, 47 int64 frame_id,
47 ResourceType::Type resource_type, 48 ResourceType::Type resource_type,
49 PageTransition::Type transition_type,
48 uint64 upload_size, 50 uint64 upload_size,
49 bool is_download, 51 bool is_download,
50 bool allow_download, 52 bool allow_download,
51 bool has_user_gesture, 53 bool has_user_gesture,
52 const content::ResourceContext* context); 54 const content::ResourceContext* context);
53 virtual ~ResourceDispatcherHostRequestInfo(); 55 virtual ~ResourceDispatcherHostRequestInfo();
54 56
55 // Top-level ResourceHandler servicing this request. 57 // Top-level ResourceHandler servicing this request.
56 ResourceHandler* resource_handler() { return resource_handler_.get(); } 58 ResourceHandler* resource_handler() { return resource_handler_.get(); }
57 59
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 bool is_download() const { return is_download_; } 121 bool is_download() const { return is_download_; }
120 void set_is_download(bool download) { is_download_ = download; } 122 void set_is_download(bool download) { is_download_ = download; }
121 123
122 // The number of clients that have called pause on this request. 124 // The number of clients that have called pause on this request.
123 int pause_count() const { return pause_count_; } 125 int pause_count() const { return pause_count_; }
124 void set_pause_count(int count) { pause_count_ = count; } 126 void set_pause_count(int count) { pause_count_ = count; }
125 127
126 // Identifies the type of resource, such as subframe, media, etc. 128 // Identifies the type of resource, such as subframe, media, etc.
127 ResourceType::Type resource_type() const { return resource_type_; } 129 ResourceType::Type resource_type() const { return resource_type_; }
128 130
131 PageTransition::Type transition_type() const { return transition_type_; }
132
129 // When there is upload data, this is the byte count of that data. When there 133 // When there is upload data, this is the byte count of that data. When there
130 // is no upload, this will be 0. 134 // is no upload, this will be 0.
131 uint64 upload_size() const { return upload_size_; } 135 uint64 upload_size() const { return upload_size_; }
132 void set_upload_size(uint64 upload_size) { upload_size_ = upload_size; } 136 void set_upload_size(uint64 upload_size) { upload_size_ = upload_size; }
133 137
134 // When we're uploading data, this is the the byte offset into the uploaded 138 // When we're uploading data, this is the the byte offset into the uploaded
135 // data that we've uploaded that we've send an upload progress update about. 139 // data that we've uploaded that we've send an upload progress update about.
136 // The ResourceDispatcherHost will periodically update this value to track 140 // The ResourceDispatcherHost will periodically update this value to track
137 // upload progress and make sure it doesn't sent out duplicate updates. 141 // upload progress and make sure it doesn't sent out duplicate updates.
138 uint64 last_upload_position() const { return last_upload_position_; } 142 uint64 last_upload_position() const { return last_upload_position_; }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 int origin_pid_; 213 int origin_pid_;
210 int request_id_; 214 int request_id_;
211 bool is_main_frame_; 215 bool is_main_frame_;
212 int64 frame_id_; 216 int64 frame_id_;
213 int pending_data_count_; 217 int pending_data_count_;
214 bool is_download_; 218 bool is_download_;
215 bool allow_download_; 219 bool allow_download_;
216 bool has_user_gesture_; 220 bool has_user_gesture_;
217 int pause_count_; 221 int pause_count_;
218 ResourceType::Type resource_type_; 222 ResourceType::Type resource_type_;
223 PageTransition::Type transition_type_;
219 uint64 upload_size_; 224 uint64 upload_size_;
220 uint64 last_upload_position_; 225 uint64 last_upload_position_;
221 base::TimeTicks last_upload_ticks_; 226 base::TimeTicks last_upload_ticks_;
222 bool waiting_for_upload_progress_ack_; 227 bool waiting_for_upload_progress_ack_;
223 int memory_cost_; 228 int memory_cost_;
224 scoped_refptr<webkit_blob::BlobData> requested_blob_data_; 229 scoped_refptr<webkit_blob::BlobData> requested_blob_data_;
225 const content::ResourceContext* context_; 230 const content::ResourceContext* context_;
226 231
227 // "Private" data accessible only to ResourceDispatcherHost (use the 232 // "Private" data accessible only to ResourceDispatcherHost (use the
228 // accessors above for consistency). 233 // accessors above for consistency).
229 bool is_paused_; 234 bool is_paused_;
230 bool called_on_response_started_; 235 bool called_on_response_started_;
231 bool has_started_reading_; 236 bool has_started_reading_;
232 int paused_read_bytes_; 237 int paused_read_bytes_;
233 238
234 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostRequestInfo); 239 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostRequestInfo);
235 }; 240 };
236 241
237 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H _ 242 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698