gecko/dom/apps/StoreTrustAnchor.jsm
Birunthan Mohanathas 3c525a1fe6 Bug 1058101 - Flatten dom/apps/src/ into parent directory. r=mccr8
--HG--
rename : dom/apps/src/AppDownloadManager.jsm => dom/apps/AppDownloadManager.jsm
rename : dom/apps/src/AppsService.js => dom/apps/AppsService.js
rename : dom/apps/src/AppsService.manifest => dom/apps/AppsService.manifest
rename : dom/apps/src/AppsServiceChild.jsm => dom/apps/AppsServiceChild.jsm
rename : dom/apps/src/AppsUtils.jsm => dom/apps/AppsUtils.jsm
rename : dom/apps/src/FreeSpaceWatcher.jsm => dom/apps/FreeSpaceWatcher.jsm
rename : dom/apps/src/InterAppComm.cpp => dom/apps/InterAppComm.cpp
rename : dom/apps/src/InterAppComm.h => dom/apps/InterAppComm.h
rename : dom/apps/src/InterAppComm.manifest => dom/apps/InterAppComm.manifest
rename : dom/apps/src/InterAppCommService.js => dom/apps/InterAppCommService.js
rename : dom/apps/src/InterAppCommService.jsm => dom/apps/InterAppCommService.jsm
rename : dom/apps/src/InterAppConnection.js => dom/apps/InterAppConnection.js
rename : dom/apps/src/InterAppMessagePort.js => dom/apps/InterAppMessagePort.js
rename : dom/apps/src/OfflineCacheInstaller.jsm => dom/apps/OfflineCacheInstaller.jsm
rename : dom/apps/src/OperatorApps.jsm => dom/apps/OperatorApps.jsm
rename : dom/apps/src/PermissionsInstaller.jsm => dom/apps/PermissionsInstaller.jsm
rename : dom/apps/src/PermissionsTable.jsm => dom/apps/PermissionsTable.jsm
rename : dom/apps/src/ScriptPreloader.jsm => dom/apps/ScriptPreloader.jsm
rename : dom/apps/src/StoreTrustAnchor.jsm => dom/apps/StoreTrustAnchor.jsm
rename : dom/apps/src/Webapps.js => dom/apps/Webapps.js
rename : dom/apps/src/Webapps.jsm => dom/apps/Webapps.jsm
rename : dom/apps/src/Webapps.manifest => dom/apps/Webapps.manifest
2014-08-27 10:12:06 -07:00

38 lines
1.1 KiB
JavaScript

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Ci = Components.interfaces;
const Cu = Components.utils;
this.EXPORTED_SYMBOLS = [
"TrustedRootCertificate"
];
const APP_TRUSTED_ROOTS= ["AppMarketplaceProdPublicRoot",
"AppMarketplaceProdReviewersRoot",
"AppMarketplaceDevPublicRoot",
"AppMarketplaceDevReviewersRoot",
"AppMarketplaceStageRoot",
"AppXPCShellRoot"];
this.TrustedRootCertificate = {
_index: Ci.nsIX509CertDB.AppMarketplaceProdPublicRoot,
get index() {
return this._index;
},
set index(aIndex) {
// aIndex should be one of the
// Ci.nsIX509CertDB AppTrustedRoot defined values
let found = APP_TRUSTED_ROOTS.some((trustRoot) => {
return Ci.nsIX509CertDB[trustRoot] === aIndex;
});
if (found) {
this._index = aIndex;
}
}
};