mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-05 01:25:38 -05:00
Initial VS Code 1.19 source merge (#571)
* Initial 1.19 xcopy * Fix yarn build * Fix numerous build breaks * Next batch of build break fixes * More build break fixes * Runtime breaks * Additional post merge fixes * Fix windows setup file * Fix test failures. * Update license header blocks to refer to source eula
This commit is contained in:
@@ -7,15 +7,14 @@ import * as os from 'os';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import * as uuid from 'vs/base/common/uuid';
|
||||
import { IStorageService } from 'vs/platform/storage/common/storage';
|
||||
import { getMachineId } from 'vs/base/node/id';
|
||||
import { resolveCommonProperties, machineIdStorageKey } from '../node/commonProperties';
|
||||
import { resolveCommonProperties } from '../node/commonProperties';
|
||||
|
||||
// {{ SQL CARBON EDIT }}
|
||||
import product from 'vs/platform/node/product';
|
||||
import * as Utils from 'sql/common/telemetryUtilities';
|
||||
|
||||
export function resolveWorkbenchCommonProperties(storageService: IStorageService, commit: string, version: string, source: string): TPromise<{ [name: string]: string }> {
|
||||
return resolveCommonProperties(commit, version, source).then(result => {
|
||||
export function resolveWorkbenchCommonProperties(storageService: IStorageService, commit: string, version: string, machineId: string, installSourcePath: string): TPromise<{ [name: string]: string }> {
|
||||
return resolveCommonProperties(commit, version, machineId, installSourcePath).then(result => {
|
||||
// __GDPR__COMMON__ "common.version.shell" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
||||
result['common.version.shell'] = process.versions && (<any>process).versions['electron'];
|
||||
// __GDPR__COMMON__ "common.version.renderer" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
||||
@@ -38,35 +37,19 @@ export function resolveWorkbenchCommonProperties(storageService: IStorageService
|
||||
result['common.lastSessionDate'] = lastSessionDate;
|
||||
// __GDPR__COMMON__ "common.isNewSession" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
||||
result['common.isNewSession'] = !lastSessionDate ? '1' : '0';
|
||||
|
||||
const promises: TPromise<any>[] = [];
|
||||
// __GDPR__COMMON__ "common.instanceId" : { "classification": "EndUserPseudonymizedInformation", "purpose": "FeatureInsight" }
|
||||
promises.push(getOrCreateInstanceId(storageService).then(value => result['common.instanceId'] = value));
|
||||
// __GDPR__COMMON__ "common.machineId" : { "classification": "EndUserPseudonymizedInformation", "purpose": "FeatureInsight" }
|
||||
promises.push(getOrCreateMachineId(storageService).then(value => result['common.machineId'] = value));
|
||||
result['common.instanceId'] = getOrCreateInstanceId(storageService);
|
||||
|
||||
return TPromise.join(promises).then(() => result);
|
||||
});
|
||||
}
|
||||
|
||||
function getOrCreateInstanceId(storageService: IStorageService): TPromise<string> {
|
||||
let result = storageService.get('telemetry.instanceId') || uuid.generateUuid();
|
||||
storageService.store('telemetry.instanceId', result);
|
||||
return TPromise.as(result);
|
||||
}
|
||||
|
||||
export function getOrCreateMachineId(storageService: IStorageService): TPromise<string> {
|
||||
let result = storageService.get(machineIdStorageKey);
|
||||
|
||||
if (result) {
|
||||
return TPromise.as(result);
|
||||
}
|
||||
|
||||
return getMachineId().then(result => {
|
||||
storageService.store(machineIdStorageKey, result);
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
function getOrCreateInstanceId(storageService: IStorageService): string {
|
||||
const result = storageService.get('telemetry.instanceId') || uuid.generateUuid();
|
||||
storageService.store('telemetry.instanceId', result);
|
||||
|
||||
return result;
|
||||
}
|
||||
// {{SQL CARBON EDIT}}
|
||||
// Get the unique ID for the current user
|
||||
function getUserId(storageService: IStorageService): Promise<string> {
|
||||
|
||||
Reference in New Issue
Block a user