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

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

Issue 187063006: Moved all state from SiteIsolationPolicy out to the PendingRequestInfo struct in the ResourceSchedu… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes Created 6 years, 9 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
« no previous file with comments | « no previous file | 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>
11 #include <string> 11 #include <string>
12 12
13 #include "base/containers/hash_tables.h" 13 #include "base/containers/hash_tables.h"
14 #include "base/memory/linked_ptr.h" 14 #include "base/memory/linked_ptr.h"
15 #include "base/memory/shared_memory.h" 15 #include "base/memory/shared_memory.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "base/time/time.h" 17 #include "base/time/time.h"
18 #include "content/common/content_export.h" 18 #include "content/common/content_export.h"
19 #include "ipc/ipc_listener.h" 19 #include "ipc/ipc_listener.h"
20 #include "ipc/ipc_sender.h" 20 #include "ipc/ipc_sender.h"
21 #include "webkit/child/resource_loader_bridge.h" 21 #include "webkit/child/resource_loader_bridge.h"
22 22
23 struct ResourceMsg_RequestCompleteData; 23 struct ResourceMsg_RequestCompleteData;
24 24
25 namespace content { 25 namespace content {
26 class ResourceDispatcherDelegate; 26 class ResourceDispatcherDelegate;
27 struct ResourceResponseHead; 27 struct ResourceResponseHead;
28 struct SiteIsolationResponseMetaData;
28 29
29 // This class serves as a communication interface between the 30 // This class serves as a communication interface between the
30 // ResourceDispatcherHost in the browser process and the ResourceLoaderBridge in 31 // ResourceDispatcherHost in the browser process and the ResourceLoaderBridge in
31 // the child process. It can be used from any child process. 32 // the child process. It can be used from any child process.
32 class CONTENT_EXPORT ResourceDispatcher : public IPC::Listener { 33 class CONTENT_EXPORT ResourceDispatcher : public IPC::Listener {
33 public: 34 public:
34 explicit ResourceDispatcher(IPC::Sender* sender); 35 explicit ResourceDispatcher(IPC::Sender* sender);
35 virtual ~ResourceDispatcher(); 36 virtual ~ResourceDispatcher();
36 37
37 // IPC::Listener implementation. 38 // IPC::Listener implementation.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 GURL url; 108 GURL url;
108 // The security origin of the frame that initiates this request. 109 // The security origin of the frame that initiates this request.
109 GURL frame_origin; 110 GURL frame_origin;
110 // The url of the latest response even in case of redirection. 111 // The url of the latest response even in case of redirection.
111 GURL response_url; 112 GURL response_url;
112 linked_ptr<IPC::Message> pending_redirect_message; 113 linked_ptr<IPC::Message> pending_redirect_message;
113 base::TimeTicks request_start; 114 base::TimeTicks request_start;
114 base::TimeTicks response_start; 115 base::TimeTicks response_start;
115 base::TimeTicks completion_time; 116 base::TimeTicks completion_time;
116 linked_ptr<base::SharedMemory> buffer; 117 linked_ptr<base::SharedMemory> buffer;
118 linked_ptr<SiteIsolationResponseMetaData> site_isolation_metadata;
119 bool blocked_response;
117 int buffer_size; 120 int buffer_size;
118 }; 121 };
119 typedef base::hash_map<int, PendingRequestInfo> PendingRequestList; 122 typedef base::hash_map<int, PendingRequestInfo> PendingRequestList;
120 123
121 // Helper to lookup the info based on the request_id. 124 // Helper to lookup the info based on the request_id.
122 // May return NULL if the request as been canceled from the client side. 125 // May return NULL if the request as been canceled from the client side.
123 PendingRequestInfo* GetPendingRequestInfo(int request_id); 126 PendingRequestInfo* GetPendingRequestInfo(int request_id);
124 127
125 // Follows redirect, if any, for the given request. 128 // Follows redirect, if any, for the given request.
126 void FollowPendingRedirect(int request_id, PendingRequestInfo& request_info); 129 void FollowPendingRedirect(int request_id, PendingRequestInfo& request_info);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 203
201 // IO thread timestamp for ongoing IPC message. 204 // IO thread timestamp for ongoing IPC message.
202 base::TimeTicks io_timestamp_; 205 base::TimeTicks io_timestamp_;
203 206
204 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); 207 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher);
205 }; 208 };
206 209
207 } // namespace content 210 } // namespace content
208 211
209 #endif // CONTENT_CHILD_RESOURCE_DISPATCHER_H_ 212 #endif // CONTENT_CHILD_RESOURCE_DISPATCHER_H_
OLDNEW
« no previous file with comments | « no previous file | content/child/resource_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698