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

Side by Side Diff: content/child/resource_dispatcher.h

Issue 23842002: Whitelisting exts and plugins from cross-site document blocking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Comments & Coding style are improved. 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
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | content/child/resource_dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #ifndef CONTENT_CHILD_RESOURCE_DISPATCHER_H_ 7 #ifndef CONTENT_CHILD_RESOURCE_DISPATCHER_H_
8 #define CONTENT_CHILD_RESOURCE_DISPATCHER_H_ 8 #define CONTENT_CHILD_RESOURCE_DISPATCHER_H_
9 9
10 #include <deque> 10 #include <deque>
(...skipping 27 matching lines...) Expand all
38 // Creates a ResourceLoaderBridge for this type of dispatcher, this is so 38 // Creates a ResourceLoaderBridge for this type of dispatcher, this is so
39 // this can be tested regardless of the ResourceLoaderBridge::Create 39 // this can be tested regardless of the ResourceLoaderBridge::Create
40 // implementation. 40 // implementation.
41 webkit_glue::ResourceLoaderBridge* CreateBridge( 41 webkit_glue::ResourceLoaderBridge* CreateBridge(
42 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info); 42 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info);
43 43
44 // Adds a request from the pending_requests_ list, returning the new 44 // Adds a request from the pending_requests_ list, returning the new
45 // requests' ID 45 // requests' ID
46 int AddPendingRequest(webkit_glue::ResourceLoaderBridge::Peer* callback, 46 int AddPendingRequest(webkit_glue::ResourceLoaderBridge::Peer* callback,
47 ResourceType::Type resource_type, 47 ResourceType::Type resource_type,
48 int origin_pid,
48 const GURL& frame_origin, 49 const GURL& frame_origin,
49 const GURL& request_url); 50 const GURL& request_url);
50 51
51 // Removes a request from the pending_requests_ list, returning true if the 52 // Removes a request from the pending_requests_ list, returning true if the
52 // request was found and removed. 53 // request was found and removed.
53 bool RemovePendingRequest(int request_id); 54 bool RemovePendingRequest(int request_id);
54 55
55 // Cancels a request in the pending_requests_ list. 56 // Cancels a request in the pending_requests_ list.
56 void CancelPendingRequest(int routing_id, int request_id); 57 void CancelPendingRequest(int routing_id, int request_id);
57 58
(...skipping 21 matching lines...) Expand all
79 80
80 private: 81 private:
81 friend class ResourceDispatcherTest; 82 friend class ResourceDispatcherTest;
82 83
83 typedef std::deque<IPC::Message*> MessageQueue; 84 typedef std::deque<IPC::Message*> MessageQueue;
84 struct PendingRequestInfo { 85 struct PendingRequestInfo {
85 PendingRequestInfo(); 86 PendingRequestInfo();
86 87
87 PendingRequestInfo(webkit_glue::ResourceLoaderBridge::Peer* peer, 88 PendingRequestInfo(webkit_glue::ResourceLoaderBridge::Peer* peer,
88 ResourceType::Type resource_type, 89 ResourceType::Type resource_type,
90 int origin_pid,
89 const GURL& frame_origin, 91 const GURL& frame_origin,
90 const GURL& request_url); 92 const GURL& request_url);
91 93
92 ~PendingRequestInfo(); 94 ~PendingRequestInfo();
93 95
94 webkit_glue::ResourceLoaderBridge::Peer* peer; 96 webkit_glue::ResourceLoaderBridge::Peer* peer;
95 ResourceType::Type resource_type; 97 ResourceType::Type resource_type;
98 // The PID of the original process which issued this request. This gets
99 // non-zero only for a request proxied by another renderer, particularly
100 // requests from plugins.
101 int origin_pid;
96 MessageQueue deferred_message_queue; 102 MessageQueue deferred_message_queue;
97 bool is_deferred; 103 bool is_deferred;
98 // Original requested url. 104 // Original requested url.
99 GURL url; 105 GURL url;
100 // The security origin of the frame that initiates this request. 106 // The security origin of the frame that initiates this request.
101 GURL frame_origin; 107 GURL frame_origin;
102 // The url of the latest response even in case of redirection. 108 // The url of the latest response even in case of redirection.
103 GURL response_url; 109 GURL response_url;
104 linked_ptr<IPC::Message> pending_redirect_message; 110 linked_ptr<IPC::Message> pending_redirect_message;
105 base::TimeTicks request_start; 111 base::TimeTicks request_start;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 205
200 // IO thread timestamp for ongoing IPC message. 206 // IO thread timestamp for ongoing IPC message.
201 base::TimeTicks io_timestamp_; 207 base::TimeTicks io_timestamp_;
202 208
203 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); 209 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher);
204 }; 210 };
205 211
206 } // namespace content 212 } // namespace content
207 213
208 #endif // CONTENT_CHILD_RESOURCE_DISPATCHER_H_ 214 #endif // CONTENT_CHILD_RESOURCE_DISPATCHER_H_
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | content/child/resource_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698