summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/in_memory_url_index_cache.proto
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/autocomplete/in_memory_url_index_cache.proto')
-rw-r--r--chrome/browser/autocomplete/in_memory_url_index_cache.proto103
1 files changed, 103 insertions, 0 deletions
diff --git a/chrome/browser/autocomplete/in_memory_url_index_cache.proto b/chrome/browser/autocomplete/in_memory_url_index_cache.proto
new file mode 100644
index 0000000..df2de1b
--- /dev/null
+++ b/chrome/browser/autocomplete/in_memory_url_index_cache.proto
@@ -0,0 +1,103 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// InMemoryURLIndex caching protocol buffers.
+//
+// At certain times during browser operation, the indexes from the
+// InMemoryURLIndex are written to a disk-based cache using the
+// following protobuf description.
+
+syntax = "proto2";
+
+option optimize_for = LITE_RUNTIME;
+
+package in_memory_url_index;
+
+message InMemoryURLIndexCacheItem {
+
+ message WordListItem {
+ required uint32 word_count = 1;
+ repeated string word = 2;
+ }
+
+ message WordMapItem {
+ message WordMapEntry {
+ required string word = 1;
+ required int32 word_id = 2;
+ }
+
+ required uint32 item_count = 1;
+ repeated WordMapEntry word_map_entry = 2;
+ }
+
+ message CharWordMapItem {
+ message CharWordMapEntry {
+ required uint32 item_count = 1;
+ required int32 char_16 = 2;
+ repeated int32 word_id = 3 [packed=true];
+ }
+
+ required uint32 item_count = 1;
+ repeated CharWordMapEntry char_word_map_entry = 2;
+ }
+
+ message WordIDHistoryMapItem {
+ message WordIDHistoryMapEntry {
+ required uint32 item_count = 1;
+ required int32 word_id = 2;
+ repeated int64 history_id = 3 [packed=true];
+ }
+
+ required uint32 item_count = 1;
+ repeated WordIDHistoryMapEntry word_id_history_map_entry = 2;
+ }
+
+ message HistoryInfoMapItem {
+ message HistoryInfoMapEntry {
+ message VisitInfo {
+ required int64 visit_time = 1;
+ // Corresponds to ui::PageTransition.
+ required uint64 transition_type = 2;
+ }
+ required int64 history_id = 1;
+ required int32 visit_count = 2;
+ required int32 typed_count = 3;
+ required int64 last_visit = 4;
+ required string url = 5;
+ optional string title = 6;
+ repeated VisitInfo visits = 7;
+ }
+
+ required uint32 item_count = 1;
+ repeated HistoryInfoMapEntry history_info_map_entry = 2;
+ }
+
+ message WordStartsMapItem {
+ message WordStartsMapEntry {
+ required int64 history_id = 1;
+ repeated int32 url_word_starts = 2 [packed=true];
+ repeated int32 title_word_starts = 3 [packed=true];
+ }
+
+ required uint32 item_count = 1;
+ repeated WordStartsMapEntry word_starts_map_entry = 2;
+ }
+
+ // The date that the cache was last rebuilt from history. Note that
+ // this cache may include items that were visited after this date if
+ // the InMemoryURLIndex was updated on the fly. This timestamp is meant
+ // to indicate the last date the index was rebuilt from the ground truth:
+ // the history database on disk.
+ required int64 last_rebuild_timestamp = 1;
+ // If there is no version we'll assume version 0.
+ optional int32 version = 2;
+ required int32 history_item_count = 3;
+
+ optional WordListItem word_list = 4;
+ optional WordMapItem word_map = 5;
+ optional CharWordMapItem char_word_map = 6;
+ optional WordIDHistoryMapItem word_id_history_map = 7;
+ optional HistoryInfoMapItem history_info_map = 8;
+ optional WordStartsMapItem word_starts_map = 9;
+}