[Pkg-mozext-commits] [perspectives-extension] 24/44: Perspectives - create functions to wrap pref get and set

David Prévot taffit at moszumanska.debian.org
Sun Jun 26 04:59:19 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository perspectives-extension.

commit af66d8ecb532abb5a6bae3435371c1a6554c8199
Author: Dave Schaefer <dave.schaefer at gmail.com>
Date:   Sun Jun 12 22:11:07 2016 -0700

    Perspectives - create functions to wrap pref get and set
    
    Eventually we want to isolate all of the browser-specific interaction
    behind an interface.
    This will let us build against multiple browsers.
---
 plugin/chrome/content/notaries.js | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/plugin/chrome/content/notaries.js b/plugin/chrome/content/notaries.js
index 4ac4aee..5087310 100644
--- a/plugin/chrome/content/notaries.js
+++ b/plugin/chrome/content/notaries.js
@@ -113,6 +113,21 @@ var Perspectives = {
 		return Perspectives.root_prefs
 	},
 
+	// TODO: migrate everything that interacts with browser internals
+	// to a Pers_Browser object, so we can keep the interface interaction clean
+	// and make it easier to migrate to other browsers in the future.
+
+	// return the value of a boolean preference
+	getBoolPref: function(prefName) {
+		return Perspectives.getRootPrefs().getBoolPref(prefName);
+	},
+
+	// set the value of a boolean preference
+	setBoolPref: function(prefName, newVal) {
+		Perspectives.getRootPrefs().setBoolPref(prefName, newVal);
+		return;
+	},
+
 	getOverrideService: function() {
 
 		if(Perspectives.overrideService === null) {

-- 
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