| Index: components/offline_pages/downloads/download_ui_item.cc
|
| diff --git a/components/offline_pages/downloads/download_ui_item.cc b/components/offline_pages/downloads/download_ui_item.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4edd5859237f7dca9e1a504e7767bd27bbb0bf12
|
| --- /dev/null
|
| +++ b/components/offline_pages/downloads/download_ui_item.cc
|
| @@ -0,0 +1,31 @@
|
| +// Copyright 2016 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/offline_pages/downloads/download_ui_item.h"
|
| +
|
| +#include "net/base/filename_util.h"
|
| +
|
| +namespace {
|
| +const char kMimeType[] = "multipart/related";
|
| +}
|
| +
|
| +namespace offline_pages {
|
| +
|
| +DownloadUIItem::DownloadUIItem()
|
| + : mime_type(kMimeType),
|
| + total_bytes(0) {
|
| +}
|
| +
|
| +DownloadUIItem::DownloadUIItem(const OfflinePageItem& page)
|
| + : guid(page.client_id.id),
|
| + url(page.url),
|
| + target_path(page.file_path),
|
| + mime_type(kMimeType),
|
| + start_time_ms(page.creation_time),
|
| + total_bytes(page.file_size) {}
|
| +
|
| +DownloadUIItem::~DownloadUIItem() {
|
| +}
|
| +
|
| +} // namespace offline_pages
|
|
|