Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / custom_home_pages_table_model.h
index cad3a41..921604c 100644 (file)
@@ -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 "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;
@@ -50,8 +56,8 @@ class CustomHomePagesTableModel : public ui::TableModel {
 
   // 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:
@@ -63,20 +69,14 @@ 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.
-  string16 FormattedURL(int row) const;
+  base::string16 FormattedURL(int row) const;
 
   // Set of entries we're showing.
   std::vector<Entry> entries_;
@@ -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);
 };