| Index: chrome/renderer/searchbox/searchbox.cc
|
| diff --git a/chrome/renderer/searchbox/searchbox.cc b/chrome/renderer/searchbox/searchbox.cc
|
| index 4aa93c34843229e4c3e01c57c83285162c96ddc3..76e0831f0de0a12f2c4d65224daf718248985d6f 100644
|
| --- a/chrome/renderer/searchbox/searchbox.cc
|
| +++ b/chrome/renderer/searchbox/searchbox.cc
|
| @@ -155,6 +155,26 @@ const ThemeBackgroundInfo& SearchBox::GetThemeBackgroundInfo() {
|
| return theme_info_;
|
| }
|
|
|
| +bool SearchBox::GenerateThumbnailURLFromRID(InstantRestrictedID rid,
|
| + GURL* url) const {
|
| + GURL most_visited_item_url(GetURLForMostVisitedItem(rid));
|
| + if (most_visited_item_url.is_empty())
|
| + return false;
|
| + *url = GURL(base::StringPrintf("chrome-search://thumb/%s",
|
| + most_visited_item_url.spec().c_str()));
|
| + return true;
|
| +}
|
| +
|
| +bool SearchBox::GenerateFaviconURLFromRID(InstantRestrictedID rid,
|
| + GURL* url) const {
|
| + GURL most_visited_item_url(GetURLForMostVisitedItem(rid));
|
| + if (most_visited_item_url.is_empty())
|
| + return false;
|
| + *url = GURL(base::StringPrintf("chrome-search://favicon/%s",
|
| + most_visited_item_url.spec().c_str()));
|
| + return true;
|
| +}
|
| +
|
| bool SearchBox::OnMessageReceived(const IPC::Message& message) {
|
| bool handled = true;
|
| IPC_BEGIN_MESSAGE_MAP(SearchBox, message)
|
| @@ -405,9 +425,8 @@ void SearchBox::SetQuery(const string16& query, bool verbatim) {
|
| }
|
|
|
| void SearchBox::OnMostVisitedChanged(
|
| - const std::vector<InstantMostVisitedItemIDPair>& items) {
|
| - most_visited_items_cache_.AddItemsWithRestrictedID(items);
|
| -
|
| + const std::vector<InstantMostVisitedItem>& items) {
|
| + most_visited_items_cache_.AddItems(items);
|
| if (render_view()->GetWebView() && render_view()->GetWebView()->mainFrame()) {
|
| extensions_v8::SearchBoxExtension::DispatchMostVisitedChanged(
|
| render_view()->GetWebView()->mainFrame());
|
|
|