summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history/history_backend.h
diff options
context:
space:
mode:
authormeelapshah@chromium.org <meelapshah@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-30 22:13:13 +0000
committermeelapshah@chromium.org <meelapshah@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-30 22:13:13 +0000
commit0f8c1125a19d64dcece55111bff692aa98bbcb2b (patch)
tree812a4a5c65346c83aa1ce054f9ff272458fceddd /chrome/browser/history/history_backend.h
parent93538a959049371a4b60c6caf806b75d8a18b7e8 (diff)
downloadchromium_src-0f8c1125a19d64dcece55111bff692aa98bbcb2b.zip
chromium_src-0f8c1125a19d64dcece55111bff692aa98bbcb2b.tar.gz
chromium_src-0f8c1125a19d64dcece55111bff692aa98bbcb2b.tar.bz2
Add a function to the History{Service,Backend} to query for a list of redirects ending at a specified URL.
Add the list of redirects leading to the URL to URLVisitedDetails which is broadcasted on HISTORY_URL_VISITED. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/151055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19667 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history/history_backend.h')
-rw-r--r--chrome/browser/history/history_backend.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/chrome/browser/history/history_backend.h b/chrome/browser/history/history_backend.h
index 1e08bab..421e0a0 100644
--- a/chrome/browser/history/history_backend.h
+++ b/chrome/browser/history/history_backend.h
@@ -142,6 +142,8 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
const QueryOptions& options);
void QueryRedirectsFrom(scoped_refptr<QueryRedirectsRequest> request,
const GURL& url);
+ void QueryRedirectsTo(scoped_refptr<QueryRedirectsRequest> request,
+ const GURL& url);
void GetVisitCountToHost(scoped_refptr<GetVisitCountToHostRequest> request,
const GURL& url);
@@ -155,6 +157,13 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
bool GetMostRecentRedirectsFrom(const GURL& url,
HistoryService::RedirectList* redirects);
+ // Similar to above function except computes a chain of redirects to the
+ // given URL. Stores the most recent list of redirects ending at |url| in the
+ // given RedirectList. For example, if we have the redirect list A -> B -> C,
+ // then calling this function with url=C would fill redirects with {B, A}.
+ bool GetMostRecentRedirectsTo(const GURL& url,
+ HistoryService::RedirectList* redirects);
+
// Thumbnails ----------------------------------------------------------------
void SetPageThumbnail(const GURL& url,
@@ -298,6 +307,11 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
void GetRedirectsFromSpecificVisit(
VisitID cur_visit, HistoryService::RedirectList* redirects);
+ // Similar to the above function except returns a redirect list ending
+ // at |cur_visit|.
+ void GetRedirectsToSpecificVisit(
+ VisitID cur_visit, HistoryService::RedirectList* redirects);
+
// Thumbnail Helpers ---------------------------------------------------------
// When a simple GetMostRecentRedirectsFrom() fails, this method is