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

Unified Diff: chrome/browser/ui/search/search_tab_helper.h

Issue 15907006: Rip out browser-side RID caching for most visited items. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 6 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/browser/ui/search/instant_page.cc ('k') | chrome/browser/ui/search/search_tab_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/search_tab_helper.h
diff --git a/chrome/browser/ui/search/search_tab_helper.h b/chrome/browser/ui/search/search_tab_helper.h
index 7b0ff13c929168030b4268cbd594dca5c77696ae..8dd771100bd814bded3345f691479189a6b21cb2 100644
--- a/chrome/browser/ui/search/search_tab_helper.h
+++ b/chrome/browser/ui/search/search_tab_helper.h
@@ -5,9 +5,12 @@
#ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_
#define CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_
+#include <vector>
+
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "chrome/browser/ui/search/search_model.h"
+#include "chrome/common/instant_types.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/web_contents_observer.h"
@@ -42,6 +45,11 @@ class SearchTabHelper : public content::NotificationObserver,
// the notification system and shouldn't call this method.
void NavigationEntryUpdated();
+ // Updates |last_known_most_visited_items_| with |items|.
+ // Returns false if |items| matches the |last_known_most_visited_items_|.
+ bool UpdateLastKnownMostVisitedItems(
+ const std::vector<InstantMostVisitedItem>& items);
+
private:
friend class content::WebContentsUserData<SearchTabHelper>;
@@ -77,6 +85,10 @@ class SearchTabHelper : public content::NotificationObserver,
content::WebContents* web_contents_;
+ // Tracks the last set of most visited items sent to the InstantPage renderer.
+ // Used to prevent sending duplicate IPC messages to the renderer.
+ std::vector<InstantMostVisitedItem> last_known_most_visited_items_;
+
DISALLOW_COPY_AND_ASSIGN(SearchTabHelper);
};
« no previous file with comments | « chrome/browser/ui/search/instant_page.cc ('k') | chrome/browser/ui/search/search_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698