// 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 CHROME_BROWSER_PREDICTORS_AUTOCOMPLETE_ACTION_PREDICTOR_TABLE_H_ #define CHROME_BROWSER_PREDICTORS_AUTOCOMPLETE_ACTION_PREDICTOR_TABLE_H_ #include <string> #include <vector> #include "base/task/sequenced_task_runner.h" #include "components/sqlite_proto/table_manager.h" #include "url/gurl.h" namespace predictors { // This manages the autocomplete predictor table within the SQLite database // passed in to the constructor. It expects the following scheme: // // network_action_predictor // id A unique id. // user_text What the user typed. // url The URL of the entry. // number_of_hits Number of times the entry was shown to the user and // selected. // number_of_misses Number of times the entry was shown to the user but not // selected. // // TODO(dominich): Consider adding this table to one of the history databases. // In memory is currently used, but adding to the on-disk visits database // would allow DeleteOldEntries to be cheaper through use of a join. // // All the functions apart from constructor and destructor have to be called in // the DB sequence provided to the constructor of this class. class AutocompleteActionPredictorTable : public sqlite_proto::TableManager { … }; } // namespace predictors #endif // CHROME_BROWSER_PREDICTORS_AUTOCOMPLETE_ACTION_PREDICTOR_TABLE_H_