[Pkg-mozext-commits] [perspectives-extension] 19/72: added user preference for max_cache_age (with "extensions." prefix)
David Prévot
taffit at moszumanska.debian.org
Thu Dec 11 02:12:46 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository perspectives-extension.
commit 7bb87786800a5c16ac372ac4aa578e8d354a7968
Author: Gerold Meisinger <gerold.meisinger at gmail.com>
Date: Sun Jun 29 12:57:15 2014 +0100
added user preference for max_cache_age (with "extensions." prefix)
Fixes #30
---
plugin/chrome/content/notaries.js | 2 +-
plugin/chrome/content/preferences_dialog.xul | 17 +++++++++++++----
plugin/chrome/locale/de/dialogs.dtd | 1 +
plugin/chrome/locale/en-US/dialogs.dtd | 1 +
plugin/chrome/locale/es-MX/dialogs.dtd | 1 +
plugin/chrome/locale/fi/dialogs.dtd | 1 +
plugin/chrome/locale/fr/dialogs.dtd | 1 +
plugin/chrome/locale/nl/dialogs.dtd | 1 +
plugin/chrome/locale/pl/dialogs.dtd | 1 +
plugin/chrome/locale/zh-CN/dialogs.dtd | 1 +
plugin/defaults/preferences/prefs.js | 4 ++--
11 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/plugin/chrome/content/notaries.js b/plugin/chrome/content/notaries.js
index 6db5bb0..44a86bd 100644
--- a/plugin/chrome/content/notaries.js
+++ b/plugin/chrome/content/notaries.js
@@ -655,7 +655,7 @@ var Perspectives = {
// clear cache if it is stale
var unix_time = Pers_util.get_unix_time();
- var max_cache_age_sec = Perspectives.root_prefs.getIntPref("perspectives.max_cache_age_sec");
+ var max_cache_age_sec = Perspectives.root_prefs.getIntPref("extensions.perspectives.max_cache_age_sec");
if(ti.query_results && ti.query_results.created < (unix_time - max_cache_age_sec)) {
Pers_debug.d_print("main", "Cached query results are stale. Re-evaluate security.");
delete ti.query_results;
diff --git a/plugin/chrome/content/preferences_dialog.xul b/plugin/chrome/content/preferences_dialog.xul
index 1c89f2d..dbbe1fe 100644
--- a/plugin/chrome/content/preferences_dialog.xul
+++ b/plugin/chrome/content/preferences_dialog.xul
@@ -20,13 +20,17 @@
name="perspectives.required_duration"
type="int"/>
<preference
- id="query-retries"
- name="extensions.perspectives.query_retries"
- type="int"/>
- <preference
id="query-timeout"
name="extensions.perspectives.query_timeout_ms"
type="int"/>
+ <preference
+ id="query-retries"
+ name="extensions.perspectives.query_retries"
+ type="int"/>
+ <preference
+ id="max-cache-age"
+ name="extensions.perspectives.max_cache_age_sec"
+ type="int"/>
<preference
id="security-settings"
name="perspectives.security_settings"
@@ -118,6 +122,11 @@
<spacer flex="1"/>
<textbox type="number" preference="query-retries" id="query-retries-text" size="4" />
</hbox>
+ <hbox align="right">
+ <label value="&MaxCacheAge;"/>
+ <spacer flex="1"/>
+ <textbox type="number" preference="max-cache-age" id="max-cache-age-text" size="4" />
+ </hbox>
</groupbox>
<groupbox>
<caption label="&OverridingFirefoxSecurityErrors;" style="font-weight: bold"/>
diff --git a/plugin/chrome/locale/de/dialogs.dtd b/plugin/chrome/locale/de/dialogs.dtd
index 67de6b2..29452eb 100644
--- a/plugin/chrome/locale/de/dialogs.dtd
+++ b/plugin/chrome/locale/de/dialogs.dtd
@@ -14,6 +14,7 @@
<!ENTITY Lengthoftimequorummustbeachieved "Nötige Anzahl Tage mit kontinuierlicher Übereinstimmung (Quorum-Dauer):">
<!ENTITY QueryTimeout "Maximale Antwortzeit für die Nachfrage bei Notaren (in Millisekunden): ">
<!ENTITY QueryRetries "Anzahl der Neuversuche wenn die Antwortzeit überschritten wurde: " >
+<!ENTITY MaxCacheAge "Cache-Vorhaltezeit für Ergebnisse der Notare (in Sekunden):" >
<!ENTITY OverridingFirefoxSecurityErrors "Firefox Sicherheitsfehler umgehen">
<!ENTITY AllowPerspectivestoautomaticallyoverridesecurityerrors "Perspectives erlauben, Sicherheitsfehler automatisch zu umgehen">
<!ENTITY PermanentlytrustcertificatesvalidatedbyPerspectives "Von Perspectives überprüften Zertifikaten dauerhaft vertrauen">
diff --git a/plugin/chrome/locale/en-US/dialogs.dtd b/plugin/chrome/locale/en-US/dialogs.dtd
index 7702a79..eb40ba1 100644
--- a/plugin/chrome/locale/en-US/dialogs.dtd
+++ b/plugin/chrome/locale/en-US/dialogs.dtd
@@ -14,6 +14,7 @@
<!ENTITY Lengthoftimequorummustbeachieved "Days of continuous agreement required (quorum duration): " >
<!ENTITY QueryTimeout "Timeout for querying notaries (in milliseconds): " >
<!ENTITY QueryRetries "Number of retries if a timeout has exceeded: " >
+<!ENTITY MaxCacheAge "Cache duration for notary results (in seconds):" >
<!ENTITY OverridingFirefoxSecurityErrors "Overriding Firefox Security Errors">
<!ENTITY AllowPerspectivestoautomaticallyoverridesecurityerrors "Allow Perspectives to automatically override security errors">
<!ENTITY PermanentlytrustcertificatesvalidatedbyPerspectives "Permanently trust certificates validated by Perspectives">
diff --git a/plugin/chrome/locale/es-MX/dialogs.dtd b/plugin/chrome/locale/es-MX/dialogs.dtd
index 84013f5..0d3a1fb 100644
--- a/plugin/chrome/locale/es-MX/dialogs.dtd
+++ b/plugin/chrome/locale/es-MX/dialogs.dtd
@@ -15,6 +15,7 @@
<!-- TODO translate -->
<!ENTITY QueryTimeout "Timeout for querying notaries (in milliseconds): " >
<!ENTITY QueryRetries "Number of retries if a timeout has exceeded: " >
+<!ENTITY MaxCacheAge "Cache duration for notary results (in seconds):" >
<!-- -->
<!ENTITY OverridingFirefoxSecurityErrors "Reemplazando los errores de seguridad de Firefox">
<!ENTITY AllowPerspectivestoautomaticallyoverridesecurityerrors "Permitir que Perspectives reemplaze automáticamente los errores de seguridad">
diff --git a/plugin/chrome/locale/fi/dialogs.dtd b/plugin/chrome/locale/fi/dialogs.dtd
index 82d488a..b865375 100644
--- a/plugin/chrome/locale/fi/dialogs.dtd
+++ b/plugin/chrome/locale/fi/dialogs.dtd
@@ -15,6 +15,7 @@
<!-- TODO translate -->
<!ENTITY QueryTimeout "Timeout for querying notaries (in milliseconds): ">
<!ENTITY QueryRetries "Number of retries if a timeout has exceeded: " >
+<!ENTITY MaxCacheAge "Cache duration for notary results (in seconds):" >
<!-- -->
<!ENTITY OverridingFirefoxSecurityErrors "Overriding Firefox Security Errors">
<!ENTITY AllowPerspectivestoautomaticallyoverridesecurityerrors "Allow Perspectives to automatically override security errors">
diff --git a/plugin/chrome/locale/fr/dialogs.dtd b/plugin/chrome/locale/fr/dialogs.dtd
index 94417c6..1bd5399 100644
--- a/plugin/chrome/locale/fr/dialogs.dtd
+++ b/plugin/chrome/locale/fr/dialogs.dtd
@@ -15,6 +15,7 @@
<!-- TODO translate -->
<!ENTITY QueryTimeout "Timeout for querying notaries (in milliseconds): ">
<!ENTITY QueryRetries "Number of retries if a timeout has exceeded: " >
+<!ENTITY MaxCacheAge "Cache duration for notary results (in seconds):" >
<!-- -->
<!ENTITY OverridingFirefoxSecurityErrors "Remplacement des erreurs de sécurité de Firefox">
<!ENTITY AllowPerspectivestoautomaticallyoverridesecurityerrors "Autoriser Perspectives à remplacer automatiquement les erreurs de sécurité">
diff --git a/plugin/chrome/locale/nl/dialogs.dtd b/plugin/chrome/locale/nl/dialogs.dtd
index 676e6b0..419b5eb 100644
--- a/plugin/chrome/locale/nl/dialogs.dtd
+++ b/plugin/chrome/locale/nl/dialogs.dtd
@@ -15,6 +15,7 @@
<!-- TODO translate -->
<!ENTITY QueryTimeout "Timeout for querying notaries (in milliseconds): ">
<!ENTITY QueryRetries "Number of retries if a timeout has exceeded: " >
+<!ENTITY MaxCacheAge "Cache duration for notary results (in seconds):" >
<!-- -->
<!ENTITY OverridingFirefoxSecurityErrors "Overriding Firefox Security Errors">
<!ENTITY AllowPerspectivestoautomaticallyoverridesecurityerrors "Allow Perspectives to automatically override security errors">
diff --git a/plugin/chrome/locale/pl/dialogs.dtd b/plugin/chrome/locale/pl/dialogs.dtd
index 07ea9d8..de6b9da 100644
--- a/plugin/chrome/locale/pl/dialogs.dtd
+++ b/plugin/chrome/locale/pl/dialogs.dtd
@@ -15,6 +15,7 @@
<!-- TODO translate -->
<!ENTITY QueryTimeout "Timeout for querying notaries (in milliseconds): ">
<!ENTITY QueryRetries "Number of retries if a timeout has exceeded: " >
+<!ENTITY MaxCacheAge "Cache duration for notary results (in seconds):" >
<!-- -->
<!ENTITY OverridingFirefoxSecurityErrors "Pomijanie błędów bezpieczeństwa Firefoxa">
<!ENTITY AllowPerspectivestoautomaticallyoverridesecurityerrors "Pozwól, by Perspectives automatycznie pomijało błędy bezpieczeństwa">
diff --git a/plugin/chrome/locale/zh-CN/dialogs.dtd b/plugin/chrome/locale/zh-CN/dialogs.dtd
index e3ae636..9ae8762 100644
--- a/plugin/chrome/locale/zh-CN/dialogs.dtd
+++ b/plugin/chrome/locale/zh-CN/dialogs.dtd
@@ -15,6 +15,7 @@
<!-- TODO translate -->
<!ENTITY QueryTimeout "Timeout for querying notaries (in milliseconds): " >
<!ENTITY QueryRetries "Number of retries if a timeout has exceeded: " >
+<!ENTITY MaxCacheAge "Cache duration for notary results (in seconds):" >
<!-- -->
<!ENTITY OverridingFirefoxSecurityErrors "跳过 Firefox 安全错误">
<!ENTITY AllowPerspectivestoautomaticallyoverridesecurityerrors "允许 Perspectives 自动跳过安全错误">
diff --git a/plugin/defaults/preferences/prefs.js b/plugin/defaults/preferences/prefs.js
index 77d3372..e2e67f9 100755
--- a/plugin/defaults/preferences/prefs.js
+++ b/plugin/defaults/preferences/prefs.js
@@ -3,8 +3,8 @@
// and https://github.com/danwent/Perspectives/issues/59
pref("perspectives.quorum_thresh" , 75);
pref("perspectives.required_duration", 0);
-pref("extensions.perspectives.query_retries" , 2);
pref("extensions.perspectives.query_timeout_ms", 5000);
+pref("extensions.perspectives.query_retries" , 2);
pref("perspectives.security_settings", 1);
pref("perspectives.exceptions.permanent", false);
pref("perspectives.exceptions.enabled", true);
@@ -17,7 +17,7 @@ pref("perspectives.svg", "");
pref("perspectives.max_timespan_for_inconsistency_test", 7);
pref("perspectives.weak_consistency_time_limit", 30);
pref("perspectives.trust_https_with_weak_consistency", true);
-pref("perspectives.max_cache_age_sec", 10000);
+pref("extensions.perspectives.max_cache_age_sec", 10000);
pref("perspectives.whitelist", "");
pref("perspectives.prompt_update_all_https_setting", true);
pref("perspectives.additional_notary_list", "");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/perspectives-extension.git
More information about the Pkg-mozext-commits
mailing list