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

Unified Diff: chrome/browser/custom_home_pages_table_model.h

Issue 330703005: Revert of Change HistoryService::QueryURL to use CancelableTaskTracker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 be6e7ec3c1626ecda343d7049e9978e3f16d62b0..64a8b82362d0de30d5e4f5f9a21a36b808a79bab 100644
--- a/chrome/browser/custom_home_pages_table_model.h
+++ b/chrome/browser/custom_home_pages_table_model.h
@@ -9,17 +9,11 @@
#include <vector>
#include "base/compiler_specific.h"
-#include "base/task/cancelable_task_tracker.h"
-#include "chrome/browser/history/history_types.h"
+#include "chrome/browser/history/history_service.h"
#include "ui/base/models/table_model.h"
class GURL;
class Profile;
-class HistoryService;
-
-namespace history {
-class URLRow;
-}
namespace ui {
class TableModelObserver;
@@ -69,11 +63,17 @@
void LoadTitle(Entry* entry);
// Callback from history service. Updates the title of the Entry whose
- // |url| matches |entry_url| and notifies the observer of the change.
- void OnGotTitle(const GURL& entry_url,
+ // |title_handle| matches |handle| and notifies the observer of the change.
+ void OnGotTitle(HistoryService::Handle handle,
bool found_url,
- const history::URLRow& row,
- const history::VisitVector& visits);
+ 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);
// Returns the URL for a particular row, formatted for display to the user.
base::string16 FormattedURL(int row) const;
@@ -87,7 +87,7 @@
ui::TableModelObserver* observer_;
// Used in loading titles.
- base::CancelableTaskTracker task_tracker_;
+ CancelableRequestConsumer history_query_consumer_;
DISALLOW_COPY_AND_ASSIGN(CustomHomePagesTableModel);
};
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_remover_unittest.cc ('k') | chrome/browser/custom_home_pages_table_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698