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

Unified Diff: ios/chrome/browser/ui/history/history_entry.cc

Issue 2590473002: Upstream Chrome on iOS source code [5/11]. (Closed)
Patch Set: Created 4 years 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: ios/chrome/browser/ui/history/history_entry.cc
diff --git a/ios/chrome/browser/ui/history/history_entry.cc b/ios/chrome/browser/ui/history/history_entry.cc
new file mode 100644
index 0000000000000000000000000000000000000000..32e8f0ababe05e25a2a587d8ea07e237b666f105
--- /dev/null
+++ b/ios/chrome/browser/ui/history/history_entry.cc
@@ -0,0 +1,40 @@
+// 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 "ios/chrome/browser/ui/history/history_entry.h"
+
+namespace history {
+
+HistoryEntry::HistoryEntry(HistoryEntry::EntryType entry_type,
+ const GURL& url,
+ const base::string16& title,
+ base::Time time,
+ const std::string& client_id,
+ bool is_search_result,
+ const base::string16& snippet,
+ bool blocked_visit)
+ : entry_type(entry_type),
+ url(url),
+ title(title),
+ time(time),
+ client_id(client_id),
+ is_search_result(is_search_result),
+ snippet(snippet),
+ blocked_visit(blocked_visit) {
+ all_timestamps.insert(time.ToInternalValue());
+}
+
+HistoryEntry::HistoryEntry()
+ : entry_type(EMPTY_ENTRY), is_search_result(false), blocked_visit(false) {}
+
+HistoryEntry::HistoryEntry(const HistoryEntry& other) = default;
+
+HistoryEntry::~HistoryEntry() {}
+
+bool HistoryEntry::SortByTimeDescending(const HistoryEntry& entry1,
+ const HistoryEntry& entry2) {
+ return entry1.time > entry2.time;
+}
+
+} // namespace history
« no previous file with comments | « ios/chrome/browser/ui/history/history_entry.h ('k') | ios/chrome/browser/ui/history/history_entry_inserter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698