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

Unified Diff: components/history/content/browser/download_database_helper.cc

Issue 2703883003: Read and restore persisted slice info (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « components/history/content/browser/download_database_helper.h ('k') | content/browser/download/download_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698