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

Side by Side Diff: components/offline_pages/offline_page_item.cc

Issue 2284933002: Remove OfflineURL from offline page (Closed)
Patch Set: Add comment per feedback Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/offline_pages/offline_page_item.h" 5 #include "components/offline_pages/offline_page_item.h"
6 6
7 #include "net/base/filename_util.h"
8
9 namespace offline_pages { 7 namespace offline_pages {
10 8
11 ClientId::ClientId() : name_space(""), id("") {} 9 ClientId::ClientId() : name_space(""), id("") {}
12 10
13 ClientId::ClientId(std::string name_space, std::string id) 11 ClientId::ClientId(std::string name_space, std::string id)
14 : name_space(name_space), id(id) {} 12 : name_space(name_space), id(id) {}
15 13
16 bool ClientId::operator==(const ClientId& client_id) const { 14 bool ClientId::operator==(const ClientId& client_id) const {
17 return name_space == client_id.name_space && id == client_id.id; 15 return name_space == client_id.name_space && id == client_id.id;
18 } 16 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 client_id == other.client_id && 65 client_id == other.client_id &&
68 file_path == other.file_path && 66 file_path == other.file_path &&
69 creation_time == other.creation_time && 67 creation_time == other.creation_time &&
70 last_access_time == other.last_access_time && 68 last_access_time == other.last_access_time &&
71 expiration_time == other.expiration_time && 69 expiration_time == other.expiration_time &&
72 access_count == other.access_count && 70 access_count == other.access_count &&
73 title == other.title && 71 title == other.title &&
74 flags == other.flags; 72 flags == other.flags;
75 } 73 }
76 74
77 GURL OfflinePageItem::GetOfflineURL() const {
78 return net::FilePathToFileURL(file_path);
79 }
80
81 bool OfflinePageItem::IsExpired() const { 75 bool OfflinePageItem::IsExpired() const {
82 return creation_time < expiration_time; 76 return creation_time < expiration_time;
83 } 77 }
84 78
85 } // namespace offline_pages 79 } // namespace offline_pages
OLDNEW
« no previous file with comments | « components/offline_pages/offline_page_item.h ('k') | components/offline_pages/offline_page_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698