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

Unified Diff: chrome/common/instant_types.h

Issue 12498002: InstantExtended: Adding InstantRestrictedIDCache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing android compile error. 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/common/instant_restricted_id_cache_unittest.cc ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/instant_types.h
diff --git a/chrome/common/instant_types.h b/chrome/common/instant_types.h
index 9f646bae449ea039cd145ba49ff38b561764eb43..880aef74d49bbdf9045e008a075576f82ada8092 100644
--- a/chrome/common/instant_types.h
+++ b/chrome/common/instant_types.h
@@ -6,11 +6,19 @@
#define CHROME_COMMON_INSTANT_TYPES_H_
#include <string>
+#include <utility>
#include "base/string16.h"
#include "content/public/common/page_transition_types.h"
#include "googleurl/src/gurl.h"
+// ID used by Instant code to refer to objects (e.g. Autocomplete results, Most
+// Visited items) that the Instant page needs access to.
+typedef int InstantRestrictedID;
+
+// The size of the InstantMostVisitedItem cache.
+const size_t kMaxInstantMostVisitedItemCacheSize = 100;
+
// Ways that the Instant suggested text is autocompleted into the omnibox.
enum InstantCompleteBehavior {
// Autocomplete the suggestion immediately.
@@ -81,6 +89,10 @@ struct InstantAutocompleteResult {
int relevance;
};
+// An InstantAutocompleteResult along with its assigned restricted ID.
+typedef std::pair<InstantRestrictedID, InstantAutocompleteResult>
+ InstantAutocompleteResultIDPair;
+
// How to interpret the size (height or width) of the Instant overlay (preview).
enum InstantSizeUnits {
// As an absolute number of pixels.
@@ -143,11 +155,6 @@ struct ThemeBackgroundInfo {
};
struct InstantMostVisitedItem {
- InstantMostVisitedItem() : most_visited_item_id(0) {}
-
- // A private identifier used on the browser side when retrieving assets.
- uint64 most_visited_item_id;
-
// The URL of the Most Visited item.
GURL url;
@@ -156,4 +163,8 @@ struct InstantMostVisitedItem {
string16 title;
};
+// An InstantMostVisitedItem along with its assigned restricted ID.
+typedef std::pair<InstantRestrictedID, InstantMostVisitedItem>
+ InstantMostVisitedItemIDPair;
+
#endif // CHROME_COMMON_INSTANT_TYPES_H_
« no previous file with comments | « chrome/common/instant_restricted_id_cache_unittest.cc ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698