@@ -7,7 +7,7 @@ import { SequencerByKey } from 'vs/base/common/async';
7
7
import { IEncryptionService } from 'vs/platform/encryption/common/encryptionService' ;
8
8
import { createDecorator } from 'vs/platform/instantiation/common/instantiation' ;
9
9
import { IStorageService , InMemoryStorageService , StorageScope , StorageTarget } from 'vs/platform/storage/common/storage' ;
10
- import { Event , PauseableEmitter } from 'vs/base/common/event' ;
10
+ import { Emitter , Event } from 'vs/base/common/event' ;
11
11
import { ILogService } from 'vs/platform/log/common/log' ;
12
12
import { IDisposable } from 'vs/base/common/lifecycle' ;
13
13
@@ -30,7 +30,7 @@ export abstract class BaseSecretStorageService implements ISecretStorageService
30
30
31
31
private _storagePrefix = 'secret://' ;
32
32
33
- private readonly _onDidChangeSecret = new PauseableEmitter < string > ( ) ;
33
+ private readonly _onDidChangeSecret = new Emitter < string > ( ) ;
34
34
onDidChangeSecret : Event < string > = this . _onDidChangeSecret . event ;
35
35
36
36
protected readonly _sequencer = new SequencerByKey < string > ( ) ;
@@ -55,11 +55,6 @@ export abstract class BaseSecretStorageService implements ISecretStorageService
55
55
return ;
56
56
}
57
57
58
- if ( this . _onDidChangeSecret . isPaused ) {
59
- this . _logService . trace ( `[SecretStorageService] Skipping change event for secret: ${ key } because it is paused` ) ;
60
- return ;
61
- }
62
-
63
58
const secretKey = key . slice ( this . _storagePrefix . length ) ;
64
59
65
60
this . _logService . trace ( `[SecretStorageService] Notifying change in value for secret: ${ secretKey } ` ) ;
@@ -104,13 +99,8 @@ export abstract class BaseSecretStorageService implements ISecretStorageService
104
99
throw e ;
105
100
}
106
101
const fullKey = this . getKey ( key ) ;
107
- try {
108
- this . _onDidChangeSecret . pause ( ) ;
109
- this . _logService . trace ( '[secrets] storing encrypted secret for key:' , fullKey ) ;
110
- storageService . store ( fullKey , encrypted , StorageScope . APPLICATION , StorageTarget . MACHINE ) ;
111
- } finally {
112
- this . _onDidChangeSecret . resume ( ) ;
113
- }
102
+ this . _logService . trace ( '[secrets] storing encrypted secret for key:' , fullKey ) ;
103
+ storageService . store ( fullKey , encrypted , StorageScope . APPLICATION , StorageTarget . MACHINE ) ;
114
104
this . _logService . trace ( '[secrets] stored encrypted secret for key:' , fullKey ) ;
115
105
} ) ;
116
106
}
@@ -120,13 +110,8 @@ export abstract class BaseSecretStorageService implements ISecretStorageService
120
110
const storageService = await this . resolvedStorageService ;
121
111
122
112
const fullKey = this . getKey ( key ) ;
123
- try {
124
- this . _onDidChangeSecret . pause ( ) ;
125
- this . _logService . trace ( '[secrets] deleting secret for key:' , fullKey ) ;
126
- storageService . remove ( fullKey , StorageScope . APPLICATION ) ;
127
- } finally {
128
- this . _onDidChangeSecret . resume ( ) ;
129
- }
113
+ this . _logService . trace ( '[secrets] deleting secret for key:' , fullKey ) ;
114
+ storageService . remove ( fullKey , StorageScope . APPLICATION ) ;
130
115
this . _logService . trace ( '[secrets] deleted secret for key:' , fullKey ) ;
131
116
} ) ;
132
117
}
0 commit comments