ExtensionInstallDialogView: fix scrolling behavior on Views (Win,Linux)
[chromium-blink-merge.git] / components / offline_pages / offline_page_item.cc
blobdf8a12240f79cf4437b81b4307ba2bbaaafcf393
1 // Copyright 2015 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.
5 #include "components/offline_pages/offline_page_item.h"
7 #include "net/base/filename_util.h"
9 namespace offline_pages {
11 namespace {
12 const int kCurrentVersion = 1;
15 OfflinePageItem::OfflinePageItem()
16 : version(kCurrentVersion),
17 file_size(0) {
20 OfflinePageItem::OfflinePageItem(const GURL& url,
21 const base::string16& title,
22 const base::FilePath& file_path,
23 int64 file_size)
24 : url(url),
25 title(title),
26 version(kCurrentVersion),
27 file_path(file_path),
28 file_size(file_size) {
31 OfflinePageItem::OfflinePageItem(const GURL& url,
32 const base::string16& title,
33 const base::FilePath& file_path,
34 int64 file_size,
35 const base::Time& creation_time)
36 : url(url),
37 title(title),
38 version(kCurrentVersion),
39 file_path(file_path),
40 file_size(file_size),
41 creation_time(creation_time),
42 last_access_time(creation_time) {
45 OfflinePageItem::~OfflinePageItem() {
48 GURL OfflinePageItem::GetOfflineURL() {
49 return net::FilePathToFileURL(file_path);
52 } // namespace offline_pages