#include <vector>
#include "base/compiler_specific.h"
-#include "chrome/browser/history/history_service.h"
+#include "base/task/cancelable_task_tracker.h"
+#include "components/history/core/browser/history_types.h"
#include "ui/base/models/table_model.h"
class GURL;
class Profile;
+class HistoryService;
+
+namespace history {
+class URLRow;
+}
namespace ui {
class TableModelObserver;
// TableModel overrides:
virtual int RowCount() OVERRIDE;
- virtual string16 GetText(int row, int column_id) OVERRIDE;
- virtual string16 GetTooltip(int row) OVERRIDE;
+ virtual base::string16 GetText(int row, int column_id) OVERRIDE;
+ virtual base::string16 GetTooltip(int row) OVERRIDE;
virtual void SetObserver(ui::TableModelObserver* observer) OVERRIDE;
private:
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.
- string16 FormattedURL(int row) const;
+ base::string16 FormattedURL(int row) const;
// Set of entries we're showing.
std::vector<Entry> entries_;
ui::TableModelObserver* observer_;
// Used in loading titles.
- CancelableRequestConsumer history_query_consumer_;
+ base::CancelableTaskTracker task_tracker_;
DISALLOW_COPY_AND_ASSIGN(CustomHomePagesTableModel);
};