| Index: chrome/browser/resources/predictors/autocomplete_action_predictor.js
|
| diff --git a/chrome/browser/resources/predictors/predictors.js b/chrome/browser/resources/predictors/autocomplete_action_predictor.js
|
| similarity index 84%
|
| copy from chrome/browser/resources/predictors/predictors.js
|
| copy to chrome/browser/resources/predictors/autocomplete_action_predictor.js
|
| index 69ff6494ee55ff2171cb8c5b984c73d63b5a3bad..bb669fb305e24261d1ce64af2ae6fed9f48d2661 100644
|
| --- a/chrome/browser/resources/predictors/predictors.js
|
| +++ b/chrome/browser/resources/predictors/autocomplete_action_predictor.js
|
| @@ -6,11 +6,9 @@
|
| * Requests the database from the backend.
|
| */
|
| function requestAutocompleteActionPredictorDb() {
|
| - console.debug('Requesting NAP DB');
|
| chrome.send('requestAutocompleteActionPredictorDb');
|
| }
|
|
|
| -
|
| /**
|
| * Callback from backend with the database contents. Sets up some globals and
|
| * calls to create the UI.
|
| @@ -18,16 +16,16 @@ function requestAutocompleteActionPredictorDb() {
|
| * including the database as a flattened list, a boolean indicating if the
|
| * system is enabled and the current hit weight.
|
| */
|
| -function updateDatabaseTable(database) {
|
| +function updateAutocompleteActionPredictorDb(database) {
|
| console.debug('Updating Table NAP DB');
|
|
|
| var filter = $('filter');
|
| filter.disabled = false;
|
| filter.onchange = function() {
|
| - updateDatabaseView(database);
|
| + updateAutocompleteActionPredictorDbView(database);
|
| };
|
|
|
| - updateDatabaseView(database);
|
| + updateAutocompleteActionPredictorDbView(database);
|
| }
|
|
|
| /**
|
| @@ -36,12 +34,12 @@ function updateDatabaseTable(database) {
|
| * including the database as a flattened list, a boolean indicating if the
|
| * system is enabled and the current hit weight.
|
| */
|
| -function updateDatabaseView(database) {
|
| +function updateAutocompleteActionPredictorDbView(database) {
|
| var databaseSection = $('databaseTableBody');
|
| var showEnabled = database.enabled && database.db;
|
|
|
| - $('enabledMode').hidden = !showEnabled;
|
| - $('disabledMode').hidden = showEnabled;
|
| + $('autocompleteActionPredictorEnabledMode').hidden = !showEnabled;
|
| + $('autocompleteActionPredictorDisabledMode').hidden = showEnabled;
|
|
|
| if (!showEnabled)
|
| return;
|
| @@ -74,6 +72,7 @@ function updateDatabaseView(database) {
|
| }
|
| }
|
| $('countBanner').textContent = 'Entries: ' + databaseSection.children.length;
|
| + $('countBanner').textContent += ' Hit Weight: ' + database.hit_weight;
|
| }
|
|
|
| document.addEventListener('DOMContentLoaded',
|
|
|