firefox/profile.js
function decode(data) {
  return io.tmpFile().then(function(file) {
    var buf = new Buffer(data, 'base64');
    return promise.checkedNodeCall(fs.writeFile, file, buf).then(function() {
      return io.tmpDir();
    }).then(function(dir) {
      var zip = new AdmZip(file);
      zip.extractAllTo(dir);  // Sync only? Why?? :-(
      return dir;
    });
  });
}
function decode(data) {
  return io.tmpFile().then(function(file) {
    var buf = new Buffer(data, 'base64');
    return promise.checkedNodeCall(fs.writeFile, file, buf).then(function() {
      return io.tmpDir();
    }).then(function(dir) {
      var zip = new AdmZip(file);
      zip.extractAllTo(dir);  // Sync only? Why?? :-(
      return dir;
    });
  });
}
function decode ( data ) { return io . tmpFile ( ) . then ( function ( file ) { var buf = new Buffer ( data , 'base64' ) ; return promise . checkedNodeCall ( fs . writeFile , file , buf ) . then ( function ( ) { return io . tmpDir ( ) ; } ) . then ( function ( dir ) { var zip = new AdmZip ( file ) ; zip . extractAllTo ( dir ) ; // Sync only? Why?? :-( return dir ; } ) ; } ) ; }
Decodes a base64 encoded profile.
@param {string} data The base64 encoded string.
@return {!promise.Promise.<string>} A promise for the path to the decoded
profile directory.
Decodes a base64 encoded profile .