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

Unified Diff: chrome/renderer/searchbox/searchbox.h

Issue 12732005: Most visited thumbnails and favicons need id-based urls (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address estade's comments. Created 7 years, 9 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
« no previous file with comments | « chrome/renderer/resources/extensions/searchbox_api.js ('k') | chrome/renderer/searchbox/searchbox.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/searchbox/searchbox.h
diff --git a/chrome/renderer/searchbox/searchbox.h b/chrome/renderer/searchbox/searchbox.h
index 9adc9913823640c61c4b4d89d66f1b4c91d4a467..188272968fb55f1bfa87625474479ac5c5cce858 100644
--- a/chrome/renderer/searchbox/searchbox.h
+++ b/chrome/renderer/searchbox/searchbox.h
@@ -49,13 +49,14 @@ class SearchBox : public content::RenderViewObserver,
content::PageTransition transition,
WindowOpenDisposition disposition);
- // Sends ChromeViewHostMsg_InstantDeleteMostVisitedItem to the browser.
- void DeleteMostVisitedItem(int most_visited_item_id);
+ // Sends ChromeViewHostMsg_SearchBoxDeleteMostVisitedItem to the browser.
+ void DeleteMostVisitedItem(uint64 most_visited_item_id);
- // Sends ChromeViewHostMsg_InstantUndoMostVisitedDeletion to the browser.
- void UndoMostVisitedDeletion(int most_visited_item_id);
+ // Sends ChromeViewHostMsg_SearchBoxUndoMostVisitedDeletion to the browser.
+ void UndoMostVisitedDeletion(uint64 most_visited_item_id);
- // Sends ChromeViewHostMsg_InstantUndoAllMostVisitedDeletions to the browser.
+ // Sends ChromeViewHostMsg_SearchBoxUndoAllMostVisitedDeletions to the
+ // browser.
void UndoAllMostVisitedDeletions();
const string16& query() const { return query_; }
@@ -82,13 +83,7 @@ class SearchBox : public content::RenderViewObserver,
const ThemeBackgroundInfo& GetThemeBackgroundInfo();
// Most Visited items.
- const std::vector<MostVisitedItem>& GetMostVisitedItems();
-
- // Secure Urls.
- int URLToMostVisitedItemID(const string16 url);
- string16 MostVisitedItemIDToURL(int most_visited_item_id);
- string16 GenerateThumbnailUrl(int most_visited_item_id);
- string16 GenerateFaviconUrl(int most_visited_item_id);
+ const std::vector<InstantMostVisitedItem>& GetMostVisitedItems() const;
private:
// Overridden from content::RenderViewObserver:
@@ -115,7 +110,7 @@ class SearchBox : public content::RenderViewObserver,
void OnFontInformationReceived(const string16& omnibox_font,
size_t omnibox_font_size);
void OnGrantChromeSearchAccessFromOrigin(const GURL& origin_url);
- void OnMostVisitedChanged(const std::vector<MostVisitedItem>& items);
+ void OnMostVisitedChanged(const std::vector<InstantMostVisitedItem>& items);
// Returns the current zoom factor of the render view or 1 on failure.
double GetZoom() const;
@@ -138,13 +133,7 @@ class SearchBox : public content::RenderViewObserver,
bool display_instant_results_;
string16 omnibox_font_;
size_t omnibox_font_size_;
- std::vector<MostVisitedItem> most_visited_items_;
-
- // TODO(dcblack): Unify this logic to work with both Most Visited and
- // history suggestions. http://crbug.com/175768
- std::map<string16, int> url_to_most_visited_item_id_map_;
- std::map<int, string16> most_visited_item_id_to_url_map_;
- int last_most_visited_item_id_;
+ std::vector<InstantMostVisitedItem> most_visited_items_;
DISALLOW_COPY_AND_ASSIGN(SearchBox);
};
« no previous file with comments | « chrome/renderer/resources/extensions/searchbox_api.js ('k') | chrome/renderer/searchbox/searchbox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698