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

Unified Diff: chrome/browser/custom_home_pages_table_model.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/custom_home_pages_table_model.h
diff --git a/chrome/browser/custom_home_pages_table_model.h b/chrome/browser/custom_home_pages_table_model.h
index 64a8b82362d0de30d5e4f5f9a21a36b808a79bab..be6e7ec3c1626ecda343d7049e9978e3f16d62b0 100644
--- a/chrome/browser/custom_home_pages_table_model.h
+++ b/chrome/browser/custom_home_pages_table_model.h
@@ -9,11 +9,17 @@
#include <vector>
#include "base/compiler_specific.h"
-#include "chrome/browser/history/history_service.h"
+#include "base/task/cancelable_task_tracker.h"
+#include "chrome/browser/history/history_types.h"
#include "ui/base/models/table_model.h"
class GURL;
class Profile;
+class HistoryService;
+
+namespace history {
+class URLRow;
+}
namespace ui {
class TableModelObserver;
@@ -63,17 +69,11 @@ class CustomHomePagesTableModel : public ui::TableModel {
void LoadTitle(Entry* entry);
// Callback from history service. Updates the title of the Entry whose
- // |title_handle| matches |handle| and notifies the observer of the change.
- void OnGotTitle(HistoryService::Handle handle,
+ // |url| matches |entry_url| and notifies the observer of the change.
+ void OnGotTitle(const GURL& entry_url,
bool found_url,
- const history::URLRow* row,
- history::VisitVector* visits);
-
- // Returns the entry whose |member| matches |handle| and sets |entry_index| to
- // the index of the entry.
- Entry* GetEntryByLoadHandle(CancelableRequestProvider::Handle Entry::* member,
- CancelableRequestProvider::Handle handle,
- int* entry_index);
+ const history::URLRow& row,
+ const history::VisitVector& visits);
// Returns the URL for a particular row, formatted for display to the user.
base::string16 FormattedURL(int row) const;
@@ -87,7 +87,7 @@ class CustomHomePagesTableModel : public ui::TableModel {
ui::TableModelObserver* observer_;
// Used in loading titles.
- CancelableRequestConsumer history_query_consumer_;
+ base::CancelableTaskTracker task_tracker_;
DISALLOW_COPY_AND_ASSIGN(CustomHomePagesTableModel);
};

Powered by Google App Engine
This is Rietveld 408576698