tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit fb1144d81414f1b911368b142bd632bdd8abf891
parent 6a107d181b6e8e01393fc5685a7c2134e6a4caae
Author: Josh Aas <jaas@kflag.net>
Date:   Mon, 27 Oct 2025 18:25:46 +0000

Bug 1996294 - comment and includes cleanup for XPCOM directory service. r=xpcom-reviewers,mccr8

Differential Revision: https://phabricator.services.mozilla.com/D269983

Diffstat:
Mxpcom/io/nsDirectoryService.cpp | 18+++++-------------
Mxpcom/io/nsDirectoryServiceDefs.h | 3+--
2 files changed, 6 insertions(+), 15 deletions(-)

diff --git a/xpcom/io/nsDirectoryService.cpp b/xpcom/io/nsDirectoryService.cpp @@ -29,10 +29,6 @@ # include <stdlib.h> # include <sys/param.h> # include "prenv.h" -# ifdef MOZ_WIDGET_COCOA -# include <CoreServices/CoreServices.h> -# include <Carbon/Carbon.h> -# endif #endif #include "SpecialSystemDirectory.h" @@ -41,10 +37,7 @@ using namespace mozilla; -//---------------------------------------------------------------------------------------- -nsresult nsDirectoryService::GetCurrentProcessDirectory(nsIFile** aFile) -//---------------------------------------------------------------------------------------- -{ +nsresult nsDirectoryService::GetCurrentProcessDirectory(nsIFile** aFile) { if (NS_WARN_IF(!aFile)) { return NS_ERROR_INVALID_ARG; } @@ -79,7 +72,7 @@ nsresult nsDirectoryService::GetCurrentProcessDirectory(nsIFile** aFile) #endif } return mXCurProcD->Clone(aFile); -} // GetCurrentProcessDirectory() +} StaticRefPtr<nsDirectoryService> nsDirectoryService::gService; @@ -319,10 +312,9 @@ nsDirectoryService::UnregisterProvider(nsIDirectoryServiceProvider* aProv) { return NS_OK; } -// DO NOT ADD ANY LOCATIONS TO THIS FUNCTION UNTIL YOU TALK TO: -// dougt@netscape.com. This is meant to be a place of xpcom or system specific -// file locations, not application specific locations. If you need the later, -// register a callback for your application. +// This is meant to be a place of xpcom or system specific file locations, +// not application specific locations. If you need the latter, register a +// callback for your application. NS_IMETHODIMP nsDirectoryService::GetFile(const char* aProp, bool* aPersistent, diff --git a/xpcom/io/nsDirectoryServiceDefs.h b/xpcom/io/nsDirectoryServiceDefs.h @@ -14,8 +14,7 @@ * subclass). Keys whose definition ends in "LIST" return an nsISimpleEnumerator * which enumerates a list of file objects. * - * Defines listed in this file are FROZEN. This list may grow. Each unique - * string in this file should have a corresponding atom defined in + * Each unique string in this file should have a corresponding atom defined in * StaticAtoms.py (search for "DirectoryService"), regardless of whether it * is defined here due to conditional compilation. */