OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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. |
| 4 |
| 5 #include "ios/chrome/browser/ui/history/history_entry.h" |
| 6 |
| 7 namespace history { |
| 8 |
| 9 HistoryEntry::HistoryEntry(HistoryEntry::EntryType entry_type, |
| 10 const GURL& url, |
| 11 const base::string16& title, |
| 12 base::Time time, |
| 13 const std::string& client_id, |
| 14 bool is_search_result, |
| 15 const base::string16& snippet, |
| 16 bool blocked_visit) |
| 17 : entry_type(entry_type), |
| 18 url(url), |
| 19 title(title), |
| 20 time(time), |
| 21 client_id(client_id), |
| 22 is_search_result(is_search_result), |
| 23 snippet(snippet), |
| 24 blocked_visit(blocked_visit) { |
| 25 all_timestamps.insert(time.ToInternalValue()); |
| 26 } |
| 27 |
| 28 HistoryEntry::HistoryEntry() |
| 29 : entry_type(EMPTY_ENTRY), is_search_result(false), blocked_visit(false) {} |
| 30 |
| 31 HistoryEntry::HistoryEntry(const HistoryEntry& other) = default; |
| 32 |
| 33 HistoryEntry::~HistoryEntry() {} |
| 34 |
| 35 bool HistoryEntry::SortByTimeDescending(const HistoryEntry& entry1, |
| 36 const HistoryEntry& entry2) { |
| 37 return entry1.time > entry2.time; |
| 38 } |
| 39 |
| 40 } // namespace history |
OLD | NEW |