| Index: components/history/content/browser/download_database_helper.cc
|
| diff --git a/components/history/content/browser/download_database_helper.cc b/components/history/content/browser/download_database_helper.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..26077cd256def38f63d26b84caa260ead1f7f88c
|
| --- /dev/null
|
| +++ b/components/history/content/browser/download_database_helper.cc
|
| @@ -0,0 +1,19 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "components/history/content/browser/download_database_helper.h"
|
| +
|
| +namespace history {
|
| +
|
| +std::vector<content::DownloadItem::ReceivedSlice> ToContentReceivedSlices(
|
| + const std::vector<DownloadSliceInfo>& info) {
|
| + std::vector<content::DownloadItem::ReceivedSlice> result;
|
| + for (const auto& slice_info : info) {
|
| + result.push_back(content::DownloadItem::ReceivedSlice(
|
| + slice_info.offset, slice_info.received_bytes));
|
| + }
|
| + return result;
|
| +}
|
| +
|
| +} // namespace history
|
|
|