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

Unified Diff: chrome/browser/history/history_types.h

Issue 9789001: Changes to add duration into history database. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/history/history_types.h
diff --git a/chrome/browser/history/history_types.h b/chrome/browser/history/history_types.h
index 823a8369f98156ca606baeb602c6a5b7fb5c643c..3f618b0b097b9753fccc38c8106024cca5585761 100644
--- a/chrome/browser/history/history_types.h
+++ b/chrome/browser/history/history_types.h
@@ -197,6 +197,15 @@ typedef int64 VisitID;
// Structure to hold the mapping between each visit's id and its source.
typedef std::map<VisitID, VisitSource> VisitSourceMap;
+// The structure contains all the extra details about a visit stored
+// in visit_details database.Consider adding active_duration etc. in the future.
+struct VisitDetailRow {
+ base::TimeDelta duration;
+};
+
+// Structure to hold the mapping between each visit's id and its details.
+typedef std::map<VisitID, VisitDetailRow> VisitDetailMap;
+
// VisitRow -------------------------------------------------------------------
// Holds all information associated with a specific visit. A visit holds time
@@ -237,6 +246,12 @@ class VisitRow {
// change.
bool is_indexed;
+ // Record how much time a user has this visit starting from the user
+ // opened this visit to the user closed or ended this visit.
+ // This includes both active and inactive time as long as
+ // the visit was present.
+ base::Time visit_duration;
+
// Compares two visits based on dates, for sorting.
bool operator<(const VisitRow& other) {
return visit_time < other.visit_time;

Powered by Google App Engine
This is Rietveld 408576698