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

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: Adds proper handling of ThumbnailSource 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
Index: chrome/renderer/searchbox/searchbox.h
diff --git a/chrome/renderer/searchbox/searchbox.h b/chrome/renderer/searchbox/searchbox.h
index 8b60a4b9bcb71afaa5ca3dbb622f0ed169282aad..b47471f1a25b724a7d0c2dab26e02d660a5ac470 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 restrict_id);
+ // Sends ChromeViewHostMsg_SearchBoxDeleteMostVisitedItem to the browser.
+ void DeleteMostVisitedItem(uint64 restricted_id);
- // Sends ChromeViewHostMsg_InstantUndoMostVisitedDeletion to the browser.
- void UndoMostVisitedDeletion(int restrict_id);
+ // Sends ChromeViewHostMsg_SearchBoxUndoMostVisitedDeletion to the browser.
+ void UndoMostVisitedDeletion(uint64 restricted_id);
- // Sends ChromeViewHostMsg_InstantUndoAllMostVisitedDeletions to the browser.
+ // Sends ChromeViewHostMsg_SearchBoxUndoAllMostVisitedDeletions to the
+ // browser.
void UndoAllMostVisitedDeletions();
const string16& query() const { return query_; }
@@ -78,17 +79,11 @@ class SearchBox : public content::RenderViewObserver,
const std::vector<InstantAutocompleteResult>& GetAutocompleteResults();
// Searchbox retains ownership of this object.
const InstantAutocompleteResult*
- GetAutocompleteResultWithId(size_t restricted_id) const;
+ GetAutocompleteResultWithId(uint64 restricted_id) const;
const ThemeBackgroundInfo& GetThemeBackgroundInfo();
// Most Visited items.
- const std::vector<MostVisitedItem>& GetMostVisitedItems();
-
- // Secure Urls.
- int UrlToRestrictedId(const string16 url);
- string16 RestrictedIdToURL(int id);
- string16 GenerateThumbnailUrl(int id);
- string16 GenerateFaviconUrl(int 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,14 +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_;
-
- // URL to Restricted Id mapping.
- // TODO(dcblack): Unify this logic to work with both Most Visited and
- // history suggestions. (crbug/175768)
- std::map<string16, int> url_to_restricted_id_map_;
- std::map<int, string16> restricted_id_to_url_map_;
- int last_restricted_id_;
+ std::vector<InstantMostVisitedItem> most_visited_items_;
DISALLOW_COPY_AND_ASSIGN(SearchBox);
};

Powered by Google App Engine
This is Rietveld 408576698