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

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

Issue 10392111: Use ByteStream in downloads system to decouple source and sink. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync'd to LKGR. Created 8 years, 6 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 // 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 #include "content/browser/renderer_host/resource_dispatcher_host_impl.h" 7 #include "content/browser/renderer_host/resource_dispatcher_host_impl.h"
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 net::URLRequest* request, 563 net::URLRequest* request,
564 ResourceContext* context, 564 ResourceContext* context,
565 int child_id, 565 int child_id,
566 int route_id, 566 int route_id,
567 int request_id, 567 int request_id,
568 bool is_content_initiated, 568 bool is_content_initiated,
569 const DownloadSaveInfo& save_info, 569 const DownloadSaveInfo& save_info,
570 const DownloadResourceHandler::OnStartedCallback& started_cb) { 570 const DownloadResourceHandler::OnStartedCallback& started_cb) {
571 scoped_ptr<ResourceHandler> handler( 571 scoped_ptr<ResourceHandler> handler(
572 new DownloadResourceHandler(child_id, route_id, request_id, 572 new DownloadResourceHandler(child_id, route_id, request_id,
573 request->url(), download_file_manager_.get(), 573 request->url(), download_file_manager_,
574 request, started_cb, save_info)); 574 request, started_cb, save_info));
575 if (delegate_) { 575 if (delegate_) {
576 ScopedVector<ResourceThrottle> throttles; 576 ScopedVector<ResourceThrottle> throttles;
577 delegate_->DownloadStarting(request, context, child_id, route_id, 577 delegate_->DownloadStarting(request, context, child_id, route_id,
578 request_id, is_content_initiated, &throttles); 578 request_id, is_content_initiated, &throttles);
579 if (!throttles.empty()) { 579 if (!throttles.empty()) {
580 handler.reset( 580 handler.reset(
581 new ThrottlingResourceHandler(this, handler.Pass(), child_id, 581 new ThrottlingResourceHandler(this, handler.Pass(), child_id,
582 request_id, throttles.Pass())); 582 request_id, throttles.Pass()));
583 } 583 }
(...skipping 1775 matching lines...) Expand 10 before | Expand all | Expand 10 after
2359 return allow_cross_origin_auth_prompt_; 2359 return allow_cross_origin_auth_prompt_;
2360 } 2360 }
2361 2361
2362 bool ResourceDispatcherHostImpl::IsTransferredNavigation( 2362 bool ResourceDispatcherHostImpl::IsTransferredNavigation(
2363 const GlobalRequestID& transferred_request_id) const { 2363 const GlobalRequestID& transferred_request_id) const {
2364 return transferred_navigations_.find(transferred_request_id) != 2364 return transferred_navigations_.find(transferred_request_id) !=
2365 transferred_navigations_.end(); 2365 transferred_navigations_.end();
2366 } 2366 }
2367 2367
2368 } // namespace content 2368 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_stats.cc ('k') | content/browser/renderer_host/resource_dispatcher_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698