"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/vs/workbench/services/credentials/browser/credentialsService.ts" between
vscode-1.50.0.tar.gz and vscode-1.50.1.tar.gz

About: Visual Studio Code is a source code editor (available for Windows, macOS and Linux). It comes with built-in support for JavaScript, TypeScript and Node.js and has extensions for other languages (such as C++, C#, Java, Python, PHP, Go). Source code.

credentialsService.ts  (vscode-1.50.0):credentialsService.ts  (vscode-1.50.1)
/*------------------------------------------------------------------------------ --------------- /*------------------------------------------------------------------------------ ---------------
* Copyright (c) Microsoft Corporation. All rights reserved. * Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for lice nse information. * Licensed under the MIT License. See License.txt in the project root for lice nse information.
*------------------------------------------------------------------------------ --------------*/ *------------------------------------------------------------------------------ --------------*/
import { ICredentialsService, ICredentialsProvider } from 'vs/workbench/services /credentials/common/credentials'; import { ICredentialsService, ICredentialsProvider } from 'vs/workbench/services /credentials/common/credentials';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/ common/environmentService'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/ common/environmentService';
import { Emitter } from 'vs/base/common/event';
export class BrowserCredentialsService implements ICredentialsService { export class BrowserCredentialsService implements ICredentialsService {
declare readonly _serviceBrand: undefined; declare readonly _serviceBrand: undefined;
private _onDidChangePassword: Emitter<void> = new Emitter();
readonly onDidChangePassword = this._onDidChangePassword.event;
private credentialsProvider: ICredentialsProvider; private credentialsProvider: ICredentialsProvider;
constructor(@IWorkbenchEnvironmentService environmentService: IWorkbenchE nvironmentService) { constructor(@IWorkbenchEnvironmentService environmentService: IWorkbenchE nvironmentService) {
if (environmentService.options && environmentService.options.cred entialsProvider) { if (environmentService.options && environmentService.options.cred entialsProvider) {
this.credentialsProvider = environmentService.options.cre dentialsProvider; this.credentialsProvider = environmentService.options.cre dentialsProvider;
} else { } else {
this.credentialsProvider = new InMemoryCredentialsProvide r(); this.credentialsProvider = new InMemoryCredentialsProvide r();
} }
} }
getPassword(service: string, account: string): Promise<string | null> { getPassword(service: string, account: string): Promise<string | null> {
return this.credentialsProvider.getPassword(service, account); return this.credentialsProvider.getPassword(service, account);
} }
setPassword(service: string, account: string, password: string): Promise< async setPassword(service: string, account: string, password: string): Pr
void> { omise<void> {
return this.credentialsProvider.setPassword(service, account, pas await this.credentialsProvider.setPassword(service, account, pass
sword); word);
this._onDidChangePassword.fire();
} }
deletePassword(service: string, account: string): Promise<boolean> { deletePassword(service: string, account: string): Promise<boolean> {
return this.credentialsProvider.deletePassword(service, account); const didDelete = this.credentialsProvider.deletePassword(service
, account);
if (didDelete) {
this._onDidChangePassword.fire();
}
return didDelete;
} }
findPassword(service: string): Promise<string | null> { findPassword(service: string): Promise<string | null> {
return this.credentialsProvider.findPassword(service); return this.credentialsProvider.findPassword(service);
} }
findCredentials(service: string): Promise<Array<{ account: string, passwo rd: string; }>> { findCredentials(service: string): Promise<Array<{ account: string, passwo rd: string; }>> {
return this.credentialsProvider.findCredentials(service); return this.credentialsProvider.findCredentials(service);
} }
} }
 End of changes. 4 change blocks. 
5 lines changed or deleted 16 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)