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

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: 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..8dfaeb3ce7339bd89780905c2773486eaa9d6220 100644
--- a/chrome/browser/history/history_backend.h
+++ b/chrome/browser/history/history_backend.h
@@ -136,6 +136,18 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
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 UpdateWithPageEndTime(const void* host,
+ int32 page_id,
+ const GURL& url,
+ const base::Time end_ts);
+
+
// Indexing ------------------------------------------------------------------
void SetPageContents(const GURL& url, const string16& contents);
@@ -391,8 +403,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 +447,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