Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/code/electron-utility/sharedProcess/contrib/userDataProfilesCleaner.ts
3296 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { RunOnceScheduler } from '../../../../base/common/async.js';
7
import { Disposable } from '../../../../base/common/lifecycle.js';
8
import { IUserDataProfilesService } from '../../../../platform/userDataProfile/common/userDataProfile.js';
9
10
export class UserDataProfilesCleaner extends Disposable {
11
12
constructor(
13
@IUserDataProfilesService userDataProfilesService: IUserDataProfilesService
14
) {
15
super();
16
17
const scheduler = this._register(new RunOnceScheduler(() => {
18
userDataProfilesService.cleanUp();
19
}, 10 * 1000 /* after 10s */));
20
scheduler.schedule();
21
}
22
}
23
24