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

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

Issue 314293005: Change HistoryService::QueryURL to use CancelableTaskTracker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 6 years, 6 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 20c6bcb003dec9b5ed4a64a7bad17dcb2c862915..bf2cec612185d5d13ec0509b9c74fb8273eccdc8 100644
--- a/chrome/browser/history/history_backend.h
+++ b/chrome/browser/history/history_backend.h
@@ -96,6 +96,16 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
const history::BriefVisitInfo& info) = 0;
};
+ // QueryURLResult stores the result of a call to QueryURL. The |row| and
+ // |visits| fields are only valid if |success| is true.
+ struct QueryURLResult {
+ QueryURLResult();
+ ~QueryURLResult();
+ bool success;
+ URLRow row;
+ VisitVector visits;
+ };
+
// Init must be called to complete object creation. This object can be
// constructed on any thread, but all other functions including Init() must
// be called on the history thread.
@@ -158,9 +168,7 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
void IterateURLs(
const scoped_refptr<visitedlink::VisitedLinkDelegate::URLEnumerator>&
enumerator);
- void QueryURL(scoped_refptr<QueryURLRequest> request,
- const GURL& url,
- bool want_visits);
+ QueryURLResult QueryURL(const GURL& url, bool want_visits);
void QueryHistory(scoped_refptr<QueryHistoryRequest> request,
const base::string16& text_query,
const QueryOptions& options);

Powered by Google App Engine
This is Rietveld 408576698