Bug 1421066 - remove getAppIniString from devtools/shared/system.js; r?ochameau
getAppIniString was found to be slow, and the results were never used;
so remove it.
MozReview-Commit-ID: Lk90vnElC0
--- a/devtools/shared/system.js
+++ b/devtools/shared/system.js
@@ -127,19 +127,16 @@ function* getSystemInfo() {
// Typically, the version of Firefox, for example.
// It is different than the version of Gecko or the XULRunner platform.
// On B2G, this is the Gaia version.
version,
// The application's build ID/date, for example "2004051604".
appbuildid: appInfo.appBuildID,
- // The application's changeset.
- changeset: exports.getAppIniString("App", "SourceStamp"),
-
// The build ID/date of Gecko and the XULRunner platform.
platformbuildid: appInfo.platformBuildID,
geckobuildid: appInfo.platformBuildID,
// The version of Gecko or XULRunner platform, for example "1.8.1.19" or
// "1.9.3pre". In "Firefox 3.7 alpha 1" the application version is "3.7a1pre"
// while the platform version is "1.9.3pre"
platformversion: geckoVersion,
@@ -212,38 +209,16 @@ function getProfileLocation() {
}
return profd.leafName;
} catch (e) {
return "";
}
}
-function getAppIniString(section, key) {
- let inifile = Services.dirsvc.get("GreD", Ci.nsIFile);
- inifile.append("application.ini");
-
- if (!inifile.exists()) {
- inifile = Services.dirsvc.get("CurProcD", Ci.nsIFile);
- inifile.append("application.ini");
- }
-
- if (!inifile.exists()) {
- return undefined;
- }
-
- let iniParser = Cc["@mozilla.org/xpcom/ini-parser-factory;1"]
- .getService(Ci.nsIINIParserFactory).createINIParser(inifile);
- try {
- return iniParser.getString(section, key);
- } catch (e) {
- return undefined;
- }
-}
-
/**
* Function for fetching screen dimensions and returning
* an enum for Telemetry.
*/
function getScreenDimensions() {
let width = {};
let height = {};
@@ -345,13 +320,12 @@ function getSetting(name) {
});
} else {
deferred.reject(new Error("No settings service"));
}
return deferred.promise;
}
exports.getSystemInfo = Task.async(getSystemInfo);
-exports.getAppIniString = getAppIniString;
exports.getSetting = getSetting;
exports.getScreenDimensions = getScreenDimensions;
exports.getOSCPU = getOSCPU;
exports.constants = AppConstants;