// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_OMNIBOX_BROWSER_SHORTCUTS_DATABASE_H_ #define COMPONENTS_OMNIBOX_BROWSER_SHORTCUTS_DATABASE_H_ #include <map> #include <string> #include <vector> #include "base/files/file_path.h" #include "base/gtest_prod_util.h" #include "base/memory/ref_counted.h" #include "base/time/time.h" #include "components/omnibox/browser/autocomplete_match.h" #include "components/omnibox/browser/autocomplete_match_type.h" #include "sql/database.h" #include "sql/meta_table.h" #include "ui/base/page_transition_types.h" #include "url/gurl.h" // This class manages the shortcut provider table within the SQLite database // passed to the constructor. It expects the following schema: // // Note: The database stores time in seconds, UTC. // // omni_box_shortcuts // id Unique id of the entry (needed for the sync). // search_text Text that shortcuts was searched with. // url The url of the shortcut. // contents Contents of the original omni-box entry. // contents_matches Comma separated matches of the |search_text| in // |contents|, for example "0,0,5,3,9,0". // description Description of the original omni-box entry. // description_matches Comma separated matches of the |search_text| in // |description|. // last_access_time Time the entry was accessed last, stored in seconds, // UTC. // number_of_hits Number of times that the entry has been selected. class ShortcutsDatabase : public base::RefCountedThreadSafe<ShortcutsDatabase> { … }; #endif // COMPONENTS_OMNIBOX_BROWSER_SHORTCUTS_DATABASE_H_