Skip to content
Permalink
9bfb9ba527
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
28 lines (22 sloc) 834 Bytes
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
/*
* NOTE: When moving this file, please update "browser" section in package.json
* and "plugins" section in webpack.testconfig.ts.
*/
import { TelemetryInfo } from "./userAgentPolicy";
interface NavigatorEx extends Navigator {
// oscpu is not yet standards-compliant, but can not be undefined in TypeScript 3.6.2
readonly oscpu: string;
}
export function getDefaultUserAgentKey(): string {
return "x-ms-command-name";
}
export function getPlatformSpecificData(): TelemetryInfo[] {
const navigator = self.navigator as NavigatorEx;
const osInfo = {
key: "OS",
value: (navigator.oscpu || navigator.platform).replace(" ", ""),
};
return [osInfo];
}