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

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

Issue 8801006: Make the transfer request code path use full referrers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years 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/content_export.h" 13 #include "content/common/content_export.h"
14 #include "content/public/common/page_transition_types.h" 14 #include "content/public/common/page_transition_types.h"
15 #include "content/public/common/process_type.h" 15 #include "content/public/common/process_type.h"
16 #include "net/base/load_states.h" 16 #include "net/base/load_states.h"
17 #include "net/url_request/url_request.h" 17 #include "net/url_request/url_request.h"
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebReferrerPolicy.h"
18 #include "webkit/glue/resource_type.h" 19 #include "webkit/glue/resource_type.h"
19 20
20 class CrossSiteResourceHandler; 21 class CrossSiteResourceHandler;
21 class ResourceDispatcherHost; 22 class ResourceDispatcherHost;
22 class ResourceDispatcherHostLoginDelegate; 23 class ResourceDispatcherHostLoginDelegate;
23 class ResourceHandler; 24 class ResourceHandler;
24 class SSLClientAuthHandler; 25 class SSLClientAuthHandler;
25 26
26 namespace content { 27 namespace content {
27 class ResourceContext; 28 class ResourceContext;
(...skipping 18 matching lines...) Expand all
46 bool is_main_frame, 47 bool is_main_frame,
47 int64 frame_id, 48 int64 frame_id,
48 bool parent_is_main_frame, 49 bool parent_is_main_frame,
49 int64 parent_frame_id, 50 int64 parent_frame_id,
50 ResourceType::Type resource_type, 51 ResourceType::Type resource_type,
51 content::PageTransition transition_type, 52 content::PageTransition transition_type,
52 uint64 upload_size, 53 uint64 upload_size,
53 bool is_download, 54 bool is_download,
54 bool allow_download, 55 bool allow_download,
55 bool has_user_gesture, 56 bool has_user_gesture,
57 WebKit::WebReferrerPolicy referrer_policy,
56 const content::ResourceContext* context); 58 const content::ResourceContext* context);
57 virtual ~ResourceDispatcherHostRequestInfo(); 59 virtual ~ResourceDispatcherHostRequestInfo();
58 60
59 // Top-level ResourceHandler servicing this request. 61 // Top-level ResourceHandler servicing this request.
60 ResourceHandler* resource_handler() { return resource_handler_.get(); } 62 ResourceHandler* resource_handler() { return resource_handler_.get(); }
61 63
62 // CrossSiteResourceHandler for this request, if it is a cross-site request. 64 // CrossSiteResourceHandler for this request, if it is a cross-site request.
63 // (NULL otherwise.) This handler is part of the chain of ResourceHandlers 65 // (NULL otherwise.) This handler is part of the chain of ResourceHandlers
64 // pointed to by resource_handler, and is not owned by this class. 66 // pointed to by resource_handler, and is not owned by this class.
65 CrossSiteResourceHandler* cross_site_handler() { 67 CrossSiteResourceHandler* cross_site_handler() {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 int memory_cost() const { return memory_cost_; } 178 int memory_cost() const { return memory_cost_; }
177 void set_memory_cost(int cost) { memory_cost_ = cost; } 179 void set_memory_cost(int cost) { memory_cost_ = cost; }
178 180
179 // We hold a reference to the requested blob data to ensure it doesn't 181 // We hold a reference to the requested blob data to ensure it doesn't
180 // get finally released prior to the net::URLRequestJob being started. 182 // get finally released prior to the net::URLRequestJob being started.
181 webkit_blob::BlobData* requested_blob_data() const { 183 webkit_blob::BlobData* requested_blob_data() const {
182 return requested_blob_data_.get(); 184 return requested_blob_data_.get();
183 } 185 }
184 void set_requested_blob_data(webkit_blob::BlobData* data); 186 void set_requested_blob_data(webkit_blob::BlobData* data);
185 187
188 WebKit::WebReferrerPolicy referrer_policy() const { return referrer_policy_; }
189
186 const content::ResourceContext* context() const { return context_; } 190 const content::ResourceContext* context() const { return context_; }
187 191
188 private: 192 private:
189 friend class ResourceDispatcherHost; 193 friend class ResourceDispatcherHost;
190 194
191 // Request is temporarily not handling network data. Should be used only 195 // Request is temporarily not handling network data. Should be used only
192 // by the ResourceDispatcherHost, not the event handlers (accessors are 196 // by the ResourceDispatcherHost, not the event handlers (accessors are
193 // provided for consistency with the rest of the interface). 197 // provided for consistency with the rest of the interface).
194 bool is_paused() const { return is_paused_; } 198 bool is_paused() const { return is_paused_; }
195 void set_is_paused(bool paused) { is_paused_ = paused; } 199 void set_is_paused(bool paused) { is_paused_ = paused; }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 bool has_user_gesture_; 240 bool has_user_gesture_;
237 int pause_count_; 241 int pause_count_;
238 ResourceType::Type resource_type_; 242 ResourceType::Type resource_type_;
239 content::PageTransition transition_type_; 243 content::PageTransition transition_type_;
240 uint64 upload_size_; 244 uint64 upload_size_;
241 uint64 last_upload_position_; 245 uint64 last_upload_position_;
242 base::TimeTicks last_upload_ticks_; 246 base::TimeTicks last_upload_ticks_;
243 bool waiting_for_upload_progress_ack_; 247 bool waiting_for_upload_progress_ack_;
244 int memory_cost_; 248 int memory_cost_;
245 scoped_refptr<webkit_blob::BlobData> requested_blob_data_; 249 scoped_refptr<webkit_blob::BlobData> requested_blob_data_;
250 WebKit::WebReferrerPolicy referrer_policy_;
246 const content::ResourceContext* context_; 251 const content::ResourceContext* context_;
247 252
248 // "Private" data accessible only to ResourceDispatcherHost (use the 253 // "Private" data accessible only to ResourceDispatcherHost (use the
249 // accessors above for consistency). 254 // accessors above for consistency).
250 bool is_paused_; 255 bool is_paused_;
251 bool called_on_response_started_; 256 bool called_on_response_started_;
252 bool has_started_reading_; 257 bool has_started_reading_;
253 int paused_read_bytes_; 258 int paused_read_bytes_;
254 259
255 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostRequestInfo); 260 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostRequestInfo);
256 }; 261 };
257 262
258 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H _ 263 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698