Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Unified Diff: chrome/browser/resources/predictors/autocomplete_action_predictor.js

Issue 10416002: Seculative resource prefetching for URLs CL. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixing enum name. Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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',

Powered by Google App Engine
This is Rietveld 408576698