Skip to content

Commit

Permalink
Remove Storage Reseed FF (#11156)
Browse files Browse the repository at this point in the history
  • Loading branch information
justindbaur authored Sep 20, 2024
1 parent 0516ca0 commit 972339b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 356 deletions.
17 changes: 3 additions & 14 deletions apps/browser/src/background/main.background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1484,14 +1484,7 @@ export default class MainBackground {
});

if (needStorageReseed) {
await this.reseedStorage(
await firstValueFrom(
this.configService.userCachedFeatureFlag$(
FeatureFlag.StorageReseedRefactor,
userBeingLoggedOut,
),
),
);
await this.reseedStorage();
}

if (BrowserApi.isManifestVersion(3)) {
Expand Down Expand Up @@ -1546,7 +1539,7 @@ export default class MainBackground {
await SafariApp.sendMessageToApp("showPopover", null, true);
}

async reseedStorage(doFillBuffer: boolean) {
async reseedStorage() {
if (
!this.platformUtilsService.isChrome() &&
!this.platformUtilsService.isVivaldi() &&
Expand All @@ -1555,11 +1548,7 @@ export default class MainBackground {
return;
}

if (doFillBuffer) {
await this.storageService.fillBuffer();
} else {
await this.storageService.reseed();
}
await this.storageService.fillBuffer();
}

async clearClipboard(clipboardValue: string, clearMs: number) {
Expand Down
19 changes: 2 additions & 17 deletions apps/browser/src/background/runtime.background.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { firstValueFrom, map, mergeMap, of, switchMap } from "rxjs";
import { firstValueFrom, map, mergeMap } from "rxjs";

import { LockService } from "@bitwarden/auth/common";
import { NotificationsService } from "@bitwarden/common/abstractions/notifications.service";
Expand Down Expand Up @@ -281,22 +281,7 @@ export default class RuntimeBackground {
await this.main.refreshMenu();
break;
case "bgReseedStorage": {
const doFillBuffer = await firstValueFrom(
this.accountService.activeAccount$.pipe(
switchMap((account) => {
if (account == null) {
return of(false);
}

return this.configService.userCachedFeatureFlag$(
FeatureFlag.StorageReseedRefactor,
account.id,
);
}),
),
);

await this.main.reseedStorage(doFillBuffer);
await this.main.reseedStorage();
break;
}
case "authResult": {
Expand Down

This file was deleted.

Loading

0 comments on commit 972339b

Please sign in to comment.