| Index: chrome/browser/resources/predictors/predictors.js
|
| diff --git a/chrome/browser/resources/network_action_predictor/network_action_predictor.js b/chrome/browser/resources/predictors/predictors.js
|
| similarity index 76%
|
| rename from chrome/browser/resources/network_action_predictor/network_action_predictor.js
|
| rename to chrome/browser/resources/predictors/predictors.js
|
| index c63db0ee6772fee7b4df2e8d2ccdd3d24aec37f2..5c7216d517157f4cb6889f3713bf295f3e614268 100644
|
| --- a/chrome/browser/resources/network_action_predictor/network_action_predictor.js
|
| +++ b/chrome/browser/resources/predictors/predictors.js
|
| @@ -5,16 +5,16 @@
|
| /**
|
| * Requests the database from the backend.
|
| */
|
| -function requestNetworkActionPredictorDb() {
|
| +function requestAutocompleteActionPredictorDb() {
|
| console.debug('Requesting NAP DB');
|
| - chrome.send('requestNetworkActionPredictorDb', [])
|
| + chrome.send('requestAutocompleteActionPredictorDb', [])
|
| }
|
|
|
|
|
| /**
|
| * Callback from backend with the database contents. Sets up some globals and
|
| * calls to create the UI.
|
| - * @param {Dictionary} database Information about NetworkActionPredictor
|
| + * @param {Dictionary} database Information about AutocompleteActionPredictor
|
| * including the database as a flattened list, a boolean indicating if the
|
| * system is enabled and the current hit weight.
|
| */
|
| @@ -32,18 +32,19 @@ function updateDatabaseTable(database) {
|
|
|
| /**
|
| * Updates the table from the database.
|
| - * @param {Dictionary} database Information about NetworkActionPredictor
|
| + * @param {Dictionary} database Information about AutocompleteActionPredictor
|
| * including the database as a flattened list, a boolean indicating if the
|
| * system is enabled and the current hit weight.
|
| */
|
| function updateDatabaseView(database) {
|
| var databaseSection = $('databaseTableBody');
|
| - var showEnabled = database.enabled && database.db;
|
| + var autocompletePredictorEnabled = database.autocompletePredictorEnabled &&
|
| + database.db;
|
|
|
| - $('enabledMode').hidden = !showEnabled;
|
| - $('disabledMode').hidden = showEnabled;
|
| + $('autocompletePredictorEnabledMode').hidden = !autocompletePredictorEnabled;
|
| + $('autocompletePredictorDisabledMode').hidden = autocompletePredictorEnabled;
|
|
|
| - if (!showEnabled)
|
| + if (!autocompletePredictorEnabled)
|
| return;
|
|
|
| var filter = $('filter');
|
| @@ -77,4 +78,5 @@ function updateDatabaseView(database) {
|
| $('countBanner').textContent += ' Hit Weight: ' + database.hit_weight;
|
| }
|
|
|
| -document.addEventListener('DOMContentLoaded', requestNetworkActionPredictorDb);
|
| +document.addEventListener('DOMContentLoaded',
|
| + requestAutocompleteActionPredictorDb);
|
|
|