| OLD | NEW |
| 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.h" | 5 #include "content/browser/download/download_job.h" |
| 6 | 6 |
| 7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.h" |
| 8 #include "content/browser/download/download_file.h" | 8 #include "content/browser/download/download_file.h" |
| 9 #include "content/browser/download/download_item_impl.h" | 9 #include "content/browser/download/download_item_impl.h" |
| 10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 // download_file_ is owned by download_item_ on the UI thread and is always | 48 // download_file_ is owned by download_item_ on the UI thread and is always |
| 49 // deleted on the FILE thread after download_file_ is nulled out. | 49 // deleted on the FILE thread after download_file_ is nulled out. |
| 50 // So it's safe to use base::Unretained here. | 50 // So it's safe to use base::Unretained here. |
| 51 BrowserThread::PostTask( | 51 BrowserThread::PostTask( |
| 52 BrowserThread::FILE, FROM_HERE, | 52 BrowserThread::FILE, FROM_HERE, |
| 53 base::Bind(&DownloadFile::AddByteStream, base::Unretained(download_file), | 53 base::Bind(&DownloadFile::AddByteStream, base::Unretained(download_file), |
| 54 base::Passed(&stream_reader), offset, length)); | 54 base::Passed(&stream_reader), offset, length)); |
| 55 } | 55 } |
| 56 | 56 |
| 57 bool DownloadJob::UsesParallelRequests() const { |
| 58 return false; |
| 59 } |
| 60 |
| 57 } // namespace content | 61 } // namespace content |
| OLD | NEW |