mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Refresh master with initial release/0.24 snapshot (#332)
* Initial port of release/0.24 source code * Fix additional headers * Fix a typo in launch.json
This commit is contained in:
@@ -22,6 +22,7 @@ import product from 'vs/platform/node/product';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { IUpdateService, State, IAutoUpdater, IUpdate, IRawUpdate } from 'vs/platform/update/common/update';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
|
||||
export class UpdateService implements IUpdateService {
|
||||
|
||||
@@ -87,7 +88,8 @@ export class UpdateService implements IUpdateService {
|
||||
@IRequestService requestService: IRequestService,
|
||||
@ILifecycleService private lifecycleService: ILifecycleService,
|
||||
@IConfigurationService private configurationService: IConfigurationService,
|
||||
@ITelemetryService private telemetryService: ITelemetryService
|
||||
@ITelemetryService private telemetryService: ITelemetryService,
|
||||
@IEnvironmentService private environmentService: IEnvironmentService
|
||||
) {
|
||||
if (process.platform === 'win32') {
|
||||
this.raw = new Win32AutoUpdaterImpl(requestService);
|
||||
@@ -99,6 +101,10 @@ export class UpdateService implements IUpdateService {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.environmentService.disableUpdates) {
|
||||
return;
|
||||
}
|
||||
|
||||
const channel = this.getUpdateChannel();
|
||||
const feedUrl = this.getUpdateFeedUrl(channel);
|
||||
|
||||
@@ -164,6 +170,11 @@ export class UpdateService implements IUpdateService {
|
||||
if (!update) {
|
||||
this._onUpdateNotAvailable.fire(explicit);
|
||||
this.state = State.Idle;
|
||||
/* __GDPR__
|
||||
"update:notAvailable" : {
|
||||
"explicit" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
||||
}
|
||||
*/
|
||||
this.telemetryService.publicLog('update:notAvailable', { explicit });
|
||||
|
||||
} else if (update.url) {
|
||||
@@ -177,6 +188,13 @@ export class UpdateService implements IUpdateService {
|
||||
this._availableUpdate = data;
|
||||
this._onUpdateAvailable.fire({ url: update.url, version: update.version });
|
||||
this.state = State.UpdateAvailable;
|
||||
/* __GDPR__
|
||||
"update:available" : {
|
||||
"explicit" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
|
||||
"version": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
|
||||
"currentVersion": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
||||
}
|
||||
*/
|
||||
this.telemetryService.publicLog('update:available', { explicit, version: update.version, currentVersion: product.commit });
|
||||
|
||||
} else {
|
||||
@@ -189,6 +207,11 @@ export class UpdateService implements IUpdateService {
|
||||
this._availableUpdate = data;
|
||||
this._onUpdateReady.fire(data);
|
||||
this.state = State.UpdateDownloaded;
|
||||
/* __GDPR__
|
||||
"update:downloaded" : {
|
||||
"version" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
|
||||
}
|
||||
*/
|
||||
this.telemetryService.publicLog('update:downloaded', { version: update.version });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user