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

Side by Side Diff: content/browser/download/download_job_factory.cc

Issue 2727143005: Change FindNextSliceToDownload() into FindSlicesToDownload() (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #include "content/browser/download/download_job_factory.h" 5 #include "content/browser/download/download_job_factory.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "content/browser/download/download_item_impl.h" 10 #include "content/browser/download/download_item_impl.h"
(...skipping 30 matching lines...) Expand all
41 41
42 } // namespace 42 } // namespace
43 43
44 std::unique_ptr<DownloadJob> DownloadJobFactory::CreateJob( 44 std::unique_ptr<DownloadJob> DownloadJobFactory::CreateJob(
45 DownloadItemImpl* download_item, 45 DownloadItemImpl* download_item,
46 std::unique_ptr<DownloadRequestHandleInterface> req_handle, 46 std::unique_ptr<DownloadRequestHandleInterface> req_handle,
47 const DownloadCreateInfo& create_info) { 47 const DownloadCreateInfo& create_info) {
48 // Build parallel download job. 48 // Build parallel download job.
49 if (ShouldUseParallelDownload(create_info)) { 49 if (ShouldUseParallelDownload(create_info)) {
50 return base::MakeUnique<ParallelDownloadJob>(download_item, 50 return base::MakeUnique<ParallelDownloadJob>(download_item,
51 std::move(req_handle)); 51 std::move(req_handle),
52 create_info);
52 } 53 }
53 54
54 // An ordinary download job. 55 // An ordinary download job.
55 return base::MakeUnique<DownloadJobImpl>(download_item, 56 return base::MakeUnique<DownloadJobImpl>(download_item,
56 std::move(req_handle)); 57 std::move(req_handle));
57 } 58 }
58 59
59 } // namespace 60 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698