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

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

Issue 9789001: Changes to add duration into history database. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a column in visits db instead of a new table 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_backend.h
diff --git a/chrome/browser/history/history_backend.h b/chrome/browser/history/history_backend.h
index 90d29fc07885e4efd0814fe74bb23674aa07a2db..fcd1460416a1f3edc064379a0c1055934235df4d 100644
--- a/chrome/browser/history/history_backend.h
+++ b/chrome/browser/history/history_backend.h
@@ -135,6 +135,17 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
void AddPage(scoped_refptr<HistoryAddPageArgs> request);
virtual void SetPageTitle(const GURL& url, const string16& title);
void AddPageNoVisitForBookmark(const GURL& url);
+ // Updates the database backend with a page's ending time stamp information.
+ // The page can be identified by the combination of the pointer to
+ // a RenderProcessHost, the page id and the url.
+ //
+ // The given pointer will not be dereferenced, it is only used for
+ // identification purposes, hence it is a void*.
+ void UpdateDBWithPageInfo(const void* host,
+ int32 page_id,
+ const GURL& url,
+ const base::Time end_ts);
+
// Indexing ------------------------------------------------------------------
@@ -391,8 +402,8 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, GetFaviconForURL);
FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest,
CloneFaviconIsRestrictedToSameDomain);
- FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest,
- QueryFilteredURLs);
+ FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, QueryFilteredURLs);
+ FRIEND_TEST_ALL_PREFIXES(HistoryBackendTest, UpdateVisitDuration);
friend class ::TestingProfile;
@@ -435,6 +446,9 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
void GetRedirectsToSpecificVisit(
VisitID cur_visit, history::RedirectList* redirects);
+ // Update the visit_duration information in visits table.
+ void UpdateVisitDuration(VisitID visit_id, const base::Time end_ts);
+
// Thumbnail Helpers ---------------------------------------------------------
// When a simple GetMostRecentRedirectsFrom() fails, this method is

Powered by Google App Engine
This is Rietveld 408576698