rename and pass environment service

This commit is contained in:
Sandeep Somavarapu
2020-08-20 10:46:56 +02:00
parent 780fb8c8e8
commit 79e9ee33c9
4 changed files with 18 additions and 17 deletions

View File

@@ -11,7 +11,7 @@ import { AuthenticationSession, AuthenticationSessionsChangeEvent } from 'vs/edi
import { Disposable, DisposableStore } from 'vs/base/common/lifecycle';
import { Emitter, Event } from 'vs/base/common/event';
import { flatten, equals } from 'vs/base/common/arrays';
import { getAuthenticationProviderActivationEvent, getAuthenticationSession, IAuthenticationService } from 'vs/workbench/services/authentication/browser/authenticationService';
import { getAuthenticationProviderActivationEvent, getCurrentAuthenticationSessionInfo, IAuthenticationService } from 'vs/workbench/services/authentication/browser/authenticationService';
import { IUserDataSyncAccountService } from 'vs/platform/userDataSync/common/userDataSyncAccount';
import { IQuickInputService, IQuickPickSeparator } from 'vs/platform/quickinput/common/quickInput';
import { IStorageService, IWorkspaceStorageChangeEvent, StorageScope } from 'vs/platform/storage/common/storage';
@@ -153,7 +153,7 @@ export class UserDataSyncWorkbenchService extends Disposable implements IUserDat
}
private async initialize(): Promise<void> {
const authenticationSession = this.environmentService.options?.credentialsProvider ? await getAuthenticationSession(this.environmentService.options?.credentialsProvider, this.productService) : undefined;
const authenticationSession = this.environmentService.options?.credentialsProvider ? await getCurrentAuthenticationSessionInfo(this.environmentService, this.productService) : undefined;
if (this.currentSessionId === undefined && this.useWorkbenchSessionId && (authenticationSession?.id || this.environmentService.options?.authenticationSessionId)) {
this.currentSessionId = authenticationSession?.id || this.environmentService.options?.authenticationSessionId;
this.useWorkbenchSessionId = false;