@@ -26,7 +26,7 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment'
2626import { IConfigurationService } from 'vs/platform/configuration/common/configuration' ;
2727import { IURLService } from 'vs/platform/url/common/url' ;
2828import { URLHandlerChannelClient , URLHandlerRouter } from 'vs/platform/url/common/urlIpc' ;
29- import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry' ;
29+ import { ITelemetryService , machineIdKey , trueMachineIdKey } from 'vs/platform/telemetry/common/telemetry' ;
3030import { NullTelemetryService , combinedAppender , LogAppender } from 'vs/platform/telemetry/common/telemetryUtils' ;
3131import { TelemetryAppenderClient } from 'vs/platform/telemetry/node/telemetryIpc' ;
3232import { TelemetryService , ITelemetryServiceConfig } from 'vs/platform/telemetry/common/telemetryService' ;
@@ -79,10 +79,6 @@ import { parseArgs, OPTIONS } from 'vs/platform/environment/node/argv';
7979import { coalesce } from 'vs/base/common/arrays' ;
8080
8181export class CodeApplication extends Disposable {
82-
83- private static readonly MACHINE_ID_KEY = 'telemetry.machineId' ;
84- private static readonly TRUE_MACHINE_ID_KEY = 'telemetry.trueMachineId' ;
85-
8682 private windowsMainService : IWindowsMainService | undefined ;
8783 private dialogMainService : IDialogMainService | undefined ;
8884
@@ -407,21 +403,21 @@ export class CodeApplication extends Disposable {
407403
408404 // We cache the machineId for faster lookups on startup
409405 // and resolve it only once initially if not cached
410- let machineId = this . stateService . getItem < string > ( CodeApplication . MACHINE_ID_KEY ) ;
406+ let machineId = this . stateService . getItem < string > ( machineIdKey ) ;
411407 if ( ! machineId ) {
412408 machineId = await getMachineId ( ) ;
413409
414- this . stateService . setItem ( CodeApplication . MACHINE_ID_KEY , machineId ) ;
410+ this . stateService . setItem ( machineIdKey , machineId ) ;
415411 }
416412
417413 // Check if machineId is hashed iBridge Device
418414 let trueMachineId : string | undefined ;
419415 if ( isMacintosh && machineId === '6c9d2bc8f91b89624add29c0abeae7fb42bf539fa1cdb2e3e57cd668fa9bcead' ) {
420- trueMachineId = this . stateService . getItem < string > ( CodeApplication . TRUE_MACHINE_ID_KEY ) ;
416+ trueMachineId = this . stateService . getItem < string > ( trueMachineIdKey ) ;
421417 if ( ! trueMachineId ) {
422418 trueMachineId = await getMachineId ( ) ;
423419
424- this . stateService . setItem ( CodeApplication . TRUE_MACHINE_ID_KEY , trueMachineId ) ;
420+ this . stateService . setItem ( trueMachineIdKey , trueMachineId ) ;
425421 }
426422 }
427423
0 commit comments