File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree File renamed without changes.
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import pkg from 'vs/platform/package';
2323import product from 'vs/platform/product' ;
2424import { isVersionValid } from 'vs/platform/extensions/node/extensionValidator' ;
2525import * as url from 'url' ;
26+ import { getMachineId } from 'vs/base/node/id' ;
2627
2728interface IRawGalleryExtensionFile {
2829 assetType : string ;
@@ -262,18 +263,11 @@ export class ExtensionGalleryService implements IExtensionGalleryService {
262263
263264 @memoize
264265 private get commonHeaders ( ) : TPromise < { [ key : string ] : string ; } > {
265- return this . telemetryService . getTelemetryInfo ( ) . then ( ( { machineId } ) => {
266- const result : { [ key : string ] : string ; } = {
267- 'X-Market-Client-Id' : `VSCode ${ pkg . version } ` ,
268- 'User-Agent' : `VSCode ${ pkg . version } `
269- } ;
270-
271- if ( machineId ) {
272- result [ 'X-Market-User-Id' ] = machineId ;
273- }
274-
275- return result ;
276- } ) ;
266+ return getMachineId ( ) . then ( machineId => ( {
267+ 'X-Market-Client-Id' : `VSCode ${ pkg . version } ` ,
268+ 'User-Agent' : `VSCode ${ pkg . version } ` ,
269+ 'X-Market-User-Id' : machineId
270+ } ) ) ;
277271 }
278272
279273 constructor (
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import { TPromise } from 'vs/base/common/winjs.base';
99import * as errors from 'vs/base/common/errors' ;
1010import * as uuid from 'vs/base/common/uuid' ;
1111import { IStorageService } from 'vs/platform/storage/common/storage' ;
12- import { getMachineId } from '../ node/machineId ' ;
12+ import { getMachineId } from 'vs/base/ node/id ' ;
1313import { resolveCommonProperties } from '../node/commonProperties' ;
1414
1515const SQM_KEY : string = '\\Software\\Microsoft\\SQMClient' ;
You can’t perform that action at this time.
0 commit comments