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

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

Issue 11028131: Shift passage of FileStream in downloads system to be by scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporated Al's comments. Created 8 years, 2 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) 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // ResourceDispatcherHost implementation: 73 // ResourceDispatcherHost implementation:
74 virtual void SetDelegate(ResourceDispatcherHostDelegate* delegate) OVERRIDE; 74 virtual void SetDelegate(ResourceDispatcherHostDelegate* delegate) OVERRIDE;
75 virtual void SetAllowCrossOriginAuthPrompt(bool value) OVERRIDE; 75 virtual void SetAllowCrossOriginAuthPrompt(bool value) OVERRIDE;
76 virtual net::Error BeginDownload( 76 virtual net::Error BeginDownload(
77 scoped_ptr<net::URLRequest> request, 77 scoped_ptr<net::URLRequest> request,
78 bool is_content_initiated, 78 bool is_content_initiated,
79 ResourceContext* context, 79 ResourceContext* context,
80 int child_id, 80 int child_id,
81 int route_id, 81 int route_id,
82 bool prefer_cache, 82 bool prefer_cache,
83 const DownloadSaveInfo& save_info, 83 scoped_ptr<DownloadSaveInfo> save_info,
84 const DownloadStartedCallback& started_callback) OVERRIDE; 84 const DownloadStartedCallback& started_callback) OVERRIDE;
85 virtual void ClearLoginDelegateForRequest(net::URLRequest* request) OVERRIDE; 85 virtual void ClearLoginDelegateForRequest(net::URLRequest* request) OVERRIDE;
86 virtual void BlockRequestsForRoute(int child_id, int route_id) OVERRIDE; 86 virtual void BlockRequestsForRoute(int child_id, int route_id) OVERRIDE;
87 virtual void ResumeBlockedRequestsForRoute( 87 virtual void ResumeBlockedRequestsForRoute(
88 int child_id, int route_id) OVERRIDE; 88 int child_id, int route_id) OVERRIDE;
89 89
90 // Puts the resource dispatcher host in an inactive state (unable to begin 90 // Puts the resource dispatcher host in an inactive state (unable to begin
91 // new requests). Cancels all pending requests. 91 // new requests). Cancels all pending requests.
92 void Shutdown(); 92 void Shutdown();
93 93
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 202
203 ResourceDispatcherHostDelegate* delegate() { 203 ResourceDispatcherHostDelegate* delegate() {
204 return delegate_; 204 return delegate_;
205 } 205 }
206 206
207 // Must be called after the ResourceRequestInfo has been created 207 // Must be called after the ResourceRequestInfo has been created
208 // and associated with the request. 208 // and associated with the request.
209 scoped_ptr<ResourceHandler> CreateResourceHandlerForDownload( 209 scoped_ptr<ResourceHandler> CreateResourceHandlerForDownload(
210 net::URLRequest* request, 210 net::URLRequest* request,
211 bool is_content_initiated, 211 bool is_content_initiated,
212 const DownloadSaveInfo& save_info, 212 scoped_ptr<DownloadSaveInfo> save_info,
213 const DownloadResourceHandler::OnStartedCallback& started_cb); 213 const DownloadResourceHandler::OnStartedCallback& started_cb);
214 214
215 void ClearSSLClientAuthHandlerForRequest(net::URLRequest* request); 215 void ClearSSLClientAuthHandlerForRequest(net::URLRequest* request);
216 216
217 private: 217 private:
218 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, 218 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
219 TestBlockedRequestsProcessDies); 219 TestBlockedRequestsProcessDies);
220 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, 220 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
221 IncrementOutstandingRequestsMemoryCost); 221 IncrementOutstandingRequestsMemoryCost);
222 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, 222 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 // http://crbug.com/90971 - Assists in tracking down use-after-frees on 420 // http://crbug.com/90971 - Assists in tracking down use-after-frees on
421 // shutdown. 421 // shutdown.
422 std::set<const ResourceContext*> active_resource_contexts_; 422 std::set<const ResourceContext*> active_resource_contexts_;
423 423
424 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); 424 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl);
425 }; 425 };
426 426
427 } // namespace content 427 } // namespace content
428 428
429 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_IMPL_H_ 429 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_message_filter.cc ('k') | content/browser/renderer_host/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698