This repository was archived by the owner on Jul 9, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
toolkit/components/telemetry Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2333,17 +2333,27 @@ BrowserGlue.prototype = {
23332333 } ,
23342334 } ,
23352335
2336- // Report the type of shortcut used to launch
2336+ // Report pinning status and the type of shortcut used to launch
23372337 {
23382338 condition : AppConstants . platform == "win" ,
2339- task : ( ) => {
2339+ task : async ( ) => {
2340+ let shellService = Cc [
2341+ "@mozilla.org/browser/shell-service;1"
2342+ ] . getService ( Ci . nsIWindowsShellService ) ;
2343+
2344+ try {
2345+ Services . telemetry . scalarSet (
2346+ "os.environment.is_taskbar_pinned" ,
2347+ await shellService . isCurrentAppPinnedToTaskbarAsync ( )
2348+ ) ;
2349+ } catch ( ex ) {
2350+ Cu . reportError ( ex ) ;
2351+ }
2352+
23402353 let classification ;
23412354 let shortcut ;
23422355 try {
23432356 shortcut = Services . appinfo . processStartupShortcut ;
2344- let shellService = Cc [
2345- "@mozilla.org/browser/shell-service;1"
2346- ] . getService ( Ci . nsIWindowsShellService ) ;
23472357 classification = shellService . classifyShortcut ( shortcut ) ;
23482358 } catch ( ex ) {
23492359 Cu . reportError ( ex ) ;
Original file line number Diff line number Diff line change @@ -1795,6 +1795,24 @@ os.environment:
17951795 operating_systems :
17961796 - windows
17971797
1798+ is_taskbar_pinned :
1799+ bug_numbers :
1800+ - 1685213
1801+ description : Whether this app was pinned to taskbar on startup
1802+ expires : " 94"
1803+ kind : boolean
1804+ notification_emails :
1805+ - application-update-telemetry-alerts@mozilla.com
1806+ - agashlin@mozilla.com
1807+ - shong@mozilla.com
1808+ release_channel_collection : opt-out
1809+ products :
1810+ - firefox
1811+ record_in_processes :
1812+ - main
1813+ operating_systems :
1814+ - windows
1815+
17981816pictureinpicture :
17991817 opened_method :
18001818 bug_numbers :
You can’t perform that action at this time.
0 commit comments