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

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

Issue 10381122: Add flag to specify if explicitly requested download is from web. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync'd to LKGR and integrated into DownloadUrlParams. Created 8 years, 7 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 // Returns the current ResourceDispatcherHostImpl. May return NULL if it 70 // Returns the current ResourceDispatcherHostImpl. May return NULL if it
71 // hasn't been created yet. 71 // hasn't been created yet.
72 static ResourceDispatcherHostImpl* Get(); 72 static ResourceDispatcherHostImpl* Get();
73 73
74 // ResourceDispatcherHost implementation: 74 // ResourceDispatcherHost implementation:
75 virtual void SetDelegate(ResourceDispatcherHostDelegate* delegate) OVERRIDE; 75 virtual void SetDelegate(ResourceDispatcherHostDelegate* delegate) OVERRIDE;
76 virtual void SetAllowCrossOriginAuthPrompt(bool value) OVERRIDE; 76 virtual void SetAllowCrossOriginAuthPrompt(bool value) OVERRIDE;
77 virtual net::Error BeginDownload( 77 virtual net::Error BeginDownload(
78 scoped_ptr<net::URLRequest> request, 78 scoped_ptr<net::URLRequest> request,
79 bool is_content_initiated,
79 ResourceContext* context, 80 ResourceContext* context,
80 int child_id, 81 int child_id,
81 int route_id, 82 int route_id,
82 bool prefer_cache, 83 bool prefer_cache,
83 const DownloadSaveInfo& save_info, 84 const DownloadSaveInfo& save_info,
84 const DownloadStartedCallback& started_callback) OVERRIDE; 85 const DownloadStartedCallback& started_callback) OVERRIDE;
85 virtual void ClearLoginDelegateForRequest(net::URLRequest* request) OVERRIDE; 86 virtual void ClearLoginDelegateForRequest(net::URLRequest* request) OVERRIDE;
86 virtual void MarkAsTransferredNavigation(net::URLRequest* request) OVERRIDE; 87 virtual void MarkAsTransferredNavigation(net::URLRequest* request) OVERRIDE;
87 88
88 // Puts the resource dispatcher host in an inactive state (unable to begin 89 // Puts the resource dispatcher host in an inactive state (unable to begin
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 ResourceDispatcherHostDelegate* delegate() { 246 ResourceDispatcherHostDelegate* delegate() {
246 return delegate_; 247 return delegate_;
247 } 248 }
248 249
249 scoped_refptr<ResourceHandler> CreateResourceHandlerForDownload( 250 scoped_refptr<ResourceHandler> CreateResourceHandlerForDownload(
250 net::URLRequest* request, 251 net::URLRequest* request,
251 ResourceContext* context, 252 ResourceContext* context,
252 int child_id, 253 int child_id,
253 int route_id, 254 int route_id,
254 int request_id, 255 int request_id,
256 bool is_content_initiated,
255 const DownloadSaveInfo& save_info, 257 const DownloadSaveInfo& save_info,
256 const DownloadResourceHandler::OnStartedCallback& started_cb); 258 const DownloadResourceHandler::OnStartedCallback& started_cb);
257 259
258 private: 260 private:
259 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, 261 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
260 TestBlockedRequestsProcessDies); 262 TestBlockedRequestsProcessDies);
261 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, 263 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
262 IncrementOutstandingRequestsMemoryCost); 264 IncrementOutstandingRequestsMemoryCost);
263 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, 265 FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
264 CalculateApproximateMemoryCost); 266 CalculateApproximateMemoryCost);
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 // http://crbug.com/90971 - Assists in tracking down use-after-frees on 509 // http://crbug.com/90971 - Assists in tracking down use-after-frees on
508 // shutdown. 510 // shutdown.
509 std::set<const ResourceContext*> canceled_resource_contexts_; 511 std::set<const ResourceContext*> canceled_resource_contexts_;
510 512
511 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); 513 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl);
512 }; 514 };
513 515
514 } // namespace content 516 } // namespace content
515 517
516 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_IMPL_H_ 518 #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