| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "content/browser/download/download_file_factory.h" | |
| 6 | |
| 7 #include "content/browser/download/download_file_impl.h" | |
| 8 #include "content/browser/power_save_blocker.h" | |
| 9 | |
| 10 namespace content { | |
| 11 | |
| 12 DownloadFileFactory::~DownloadFileFactory() {} | |
| 13 | |
| 14 content::DownloadFile* DownloadFileFactory::CreateFile( | |
| 15 const content::DownloadSaveInfo& save_info, | |
| 16 GURL url, | |
| 17 GURL referrer_url, | |
| 18 int64 received_bytes, | |
| 19 bool calculate_hash, | |
| 20 scoped_ptr<content::ByteStreamReader> stream, | |
| 21 const net::BoundNetLog& bound_net_log, | |
| 22 base::WeakPtr<content::DownloadDestinationObserver> observer) { | |
| 23 scoped_ptr<content::PowerSaveBlocker> psb( | |
| 24 new content::PowerSaveBlocker( | |
| 25 content::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension, | |
| 26 "Download in progress")); | |
| 27 return new DownloadFileImpl( | |
| 28 save_info, url, referrer_url, received_bytes, calculate_hash, | |
| 29 stream.Pass(), bound_net_log, psb.Pass(), observer); | |
| 30 } | |
| 31 | |
| 32 } // namespace content | |
| OLD | NEW |