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

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: Rebase and add comment for scoped_ptr usage 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 d5a9fc4a1afa3f42d358ca71f773df7c7baba8b3..e000e6b3c78fe1efc02883d81b5607494957a8b8 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.
@@ -150,9 +160,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