th, stagingPath, [
          "favicons.sqlite",
        ])
      ),
    ];
    await Promise.all(timedCopies);

    // Now that both databases are copied, open the places db copy to remove
    // downloaded files, since they won't be valid in the restored profile.
    await lazy.PlacesDBUtils.removeDownloadsMetadataFromDb(
      PathUtils.join(stagingPath, "places.sqlite")
    );

    return null;
  }

  async recover(manifestEntry, recoveryPath, destProfilePath) {
    const simpleCopyFiles = ["places.sqlite", "favicons.sqlite"];
    await BackupResource.copyFiles(
      recoveryPath,
      destProfilePath,
      simpleCopyFiles
    );
    return null;
  }

  async measure(profilePath = PathUtils.profileDir) {
    let placesDBPath = PathUtils.join(profilePath, "places.sqlite");
    let faviconsDBPath = PathUtils.join(profilePath, "favicons.sqlite");
    let placesDBSize = await BackupResource.getFileSize(placesDBPath);
    let faviconsDBSize = await BackupResource.getFileSize(faviconsDBPath);

    Glean.browserBackup.placesSize.set(placesDBSize);
    Glean.browserBackup.faviconsSize.set(faviconsDBSize);
  }
}
PK