~ubuntu-branches/ubuntu/utopic/ubufox/utopic-proposed

« back to all changes in this revision

Viewing changes to modules/PluginFinder.jsm

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2012-06-27 20:37:53 UTC
  • mfrom: (1.1.33)
  • Revision ID: package-import@ubuntu.com-20120627203753-h33vgglw1fiozx7t
Tags: 2.1-0ubuntu1
* New upstream release.
  - Drop the alternative plugin selector, as it depends on a patch that
    we no longer carry in Firefox
* Drop the lsb-release build-depend now, as we don't hardcode distro
  information in the build now

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
const INSTALL_FINISHED = 2;
48
48
 
49
49
Cu.import("resource://gre/modules/Services.jsm");
 
50
Cu.import("resource://ubufox/Distro.jsm");
50
51
 
51
52
var EXPORTED_SYMBOLS = [ "PluginFinder", "PluginFinderDevel" ];
52
53
 
131
132
  init: function PFI_init() {
132
133
    LOG("Initializing plugin finder module");
133
134
 
134
 
    try {
135
 
      let providers =
136
 
        Services.prefs.getCharPref("extensions.ubufox.pfsproviders").split(",");
137
 
      LOG("Providers: " + providers);
138
 
 
139
 
      providers.forEach(function(provider) {
140
 
        let resource = Services.prefs.getCharPref("extensions.ubufox.pfsproviders."
141
 
                                                  + provider);
142
 
        LOG("Loading provider " + resource);
143
 
        Cu.import(resource);
144
 
      });      
145
 
    } catch(ex) {
146
 
      LOG(ex);
147
 
      Cu.import("resource://ubufox/PluginProviderPFS.jsm");
148
 
    }
149
 
 
150
 
    try {
151
 
      let installers =
152
 
        Services.prefs.getCharPref("extensions.ubufox.installers").split(",");
153
 
      LOG("Installers: " + installers);
154
 
 
155
 
      installers.forEach(function(installer) {
156
 
        let resource = Services.prefs.getCharPref("extensions.ubufox.installers."
157
 
                                                  + installer);
158
 
        LOG("Loading installer " + resource);
159
 
        Cu.import(resource);
160
 
      });
161
 
    } catch(ex) {
162
 
      LOG(ex);
163
 
      Cu.import("resource://ubufox/PluginInstallerApt.jsm");
164
 
      Cu.import("resource://ubufox/PluginInstallerExternal.jsm");
165
 
    }
 
135
    distro.PFSProviders.forEach(function(provider) {
 
136
      try {
 
137
        LOG("Loading provider " + provider);
 
138
        Cu.import(provider);
 
139
      } catch(e) {
 
140
        Cu.reportError("Failed to import provider: " + e);
 
141
      }
 
142
    });
 
143
 
 
144
    distro.PFSInstallers.forEach(function(installer) {
 
145
      try {
 
146
        LOG("Loading installer " + installer);
 
147
        Cu.import(installer);
 
148
      } catch(e) {
 
149
        Cu.reportError("Failed to import installer: " + e);
 
150
      }
 
151
    });
166
152
  },
167
153
 
168
154
  registerProvider: function PFI_registerProvider(aProvider) {