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

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

Issue 12771013: Instant: Make clicks on Most Visited items work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make context of RIDs clearer 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 8b60a4b9bcb71afaa5ca3dbb622f0ed169282aad..efacebb54fea55c1738deceb66032b91147dc220 100644
--- a/chrome/renderer/searchbox/searchbox.h
+++ b/chrome/renderer/searchbox/searchbox.h
@@ -50,10 +50,10 @@ class SearchBox : public content::RenderViewObserver,
WindowOpenDisposition disposition);
// Sends ChromeViewHostMsg_InstantDeleteMostVisitedItem to the browser.
- void DeleteMostVisitedItem(int restrict_id);
+ void DeleteMostVisitedItem(int most_visited_item_id);
// Sends ChromeViewHostMsg_InstantUndoMostVisitedDeletion to the browser.
- void UndoMostVisitedDeletion(int restrict_id);
+ void UndoMostVisitedDeletion(int most_visited_item_id);
// Sends ChromeViewHostMsg_InstantUndoAllMostVisitedDeletions to the browser.
void UndoAllMostVisitedDeletions();
@@ -78,17 +78,17 @@ 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(size_t autocomplete_result_id) const;
const ThemeBackgroundInfo& GetThemeBackgroundInfo();
// Most Visited items.
const std::vector<MostVisitedItem>& GetMostVisitedItems();
- // Secure Urls.
+ // Secure Urls. IDs here are for Most Visited items.
int UrlToRestrictedId(const string16 url);
David Black 2013/03/11 21:19:30 Function names too, please! (They're more visible
sreeram 2013/03/11 21:42:00 Done.
- string16 RestrictedIdToURL(int id);
- string16 GenerateThumbnailUrl(int id);
- string16 GenerateFaviconUrl(int id);
+ string16 RestrictedIdToURL(int most_visited_item_id);
+ string16 GenerateThumbnailUrl(int most_visited_item_id);
+ string16 GenerateFaviconUrl(int most_visited_item_id);
private:
// Overridden from content::RenderViewObserver:
@@ -140,12 +140,12 @@ class SearchBox : public content::RenderViewObserver,
size_t omnibox_font_size_;
std::vector<MostVisitedItem> most_visited_items_;
- // URL to Restricted Id mapping.
+ // URL to Restricted Id mapping. IDs here are for Most Visited items.
// 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::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_;
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