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 74% |
rename from chrome/browser/resources/network_action_predictor/network_action_predictor.js |
rename to chrome/browser/resources/predictors/predictors.js |
index 11343cb9dd65c7ac4e10aeafe53e7e3091320710..840ab5878dc3dff192f9f990751b1547fdefe357 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'); |
@@ -74,4 +75,5 @@ function updateDatabaseView(database) { |
$('countBanner').textContent += ' Hit Weight: ' + database.hit_weight; |
} |
-document.addEventListener('DOMContentLoaded', requestNetworkActionPredictorDb); |
+document.addEventListener('DOMContentLoaded', |
+ requestAutocompleteActionPredictorDb); |