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

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

Issue 475783002: PlzNavigate: add cancel navigation logic for uncommitted requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added tests for the navigation request ID Created 6 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
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 // This is the browser side of the resource dispatcher, it receives requests 5 // This is the browser side of the resource dispatcher, it receives requests
6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and 6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and
7 // dispatches them to URLRequests. It then forwards the messages from the 7 // dispatches them to URLRequests. It then forwards the messages from the
8 // URLRequests back to the correct process for handling. 8 // URLRequests back to the correct process for handling.
9 // 9 //
10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 // the request should cancel. 233 // the request should cancel.
234 bool HasSufficientResourcesForRequest(const net::URLRequest* request_); 234 bool HasSufficientResourcesForRequest(const net::URLRequest* request_);
235 235
236 // Called by a ResourceHandler after it has finished its request and is done 236 // Called by a ResourceHandler after it has finished its request and is done
237 // using its shared memory buffer. Frees up that file descriptor to be used 237 // using its shared memory buffer. Frees up that file descriptor to be used
238 // elsewhere. 238 // elsewhere.
239 void FinishedWithResourcesForRequest(const net::URLRequest* request_); 239 void FinishedWithResourcesForRequest(const net::URLRequest* request_);
240 240
241 // Called by NavigationRequest to start a navigation request in the node 241 // Called by NavigationRequest to start a navigation request in the node
242 // identified by |frame_node_id|. 242 // identified by |frame_node_id|.
243 void NavigationRequest(const NavigationRequestInfo& info, 243 void StartNavigationRequest(const NavigationRequestInfo& info,
244 scoped_refptr<ResourceRequestBody> request_body, 244 scoped_refptr<ResourceRequestBody> request_body,
245 int64 frame_node_id); 245 int64 navigation_request_id,
246 int64 frame_node_id);
247
248 // PlzNavigate
249 // Called by NavigationRequest to cancel a navigation request with the
250 // provided |navigation_request_id| from the node identified by
251 // |frame_node_id|.
252 void CancelNavigationRequest(int64 navigation_request_id,
253 int64 frame_node_id);
246 254
247 private: 255 private:
248 friend class ResourceDispatcherHostTest; 256 friend class ResourceDispatcherHostTest;
249 257
250 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, 258 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
251 TestBlockedRequestsProcessDies); 259 TestBlockedRequestsProcessDies);
252 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, 260 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
253 CalculateApproximateMemoryCost); 261 CalculateApproximateMemoryCost);
254 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, 262 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
255 DetachableResourceTimesOut); 263 DetachableResourceTimesOut);
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 DelegateMap delegate_map_; 524 DelegateMap delegate_map_;
517 525
518 scoped_ptr<ResourceScheduler> scheduler_; 526 scoped_ptr<ResourceScheduler> scheduler_;
519 527
520 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); 528 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl);
521 }; 529 };
522 530
523 } // namespace content 531 } // namespace content
524 532
525 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ 533 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698