[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-115.7.0esr-13.5-1] fixup! Bug 9173: Change the default Firefox profile directory to be relative.



Title: GitLab

Pier Angelo Vendrame pushed to branch tor-browser-115.7.0esr-13.5-1 at The Tor Project / Applications / Tor Browser

Commits:

  • c78c48e7
    by Pier Angelo Vendrame at 2024-02-07T16:34:15+01:00
    fixup! Bug 9173: Change the default Firefox profile directory to be relative.
    
    Add a method to query whether the browser is in portable mode.
    

2 changed files:

Changes:

  • toolkit/xre/nsIXREDirProvider.idl
    ... ... @@ -20,4 +20,9 @@ interface nsIXREDirProvider : nsISupports
    20 20
        * Gets the hash for the current installation directory.
    
    21 21
        */
    
    22 22
       AString getInstallHash();
    
    23
    +
    
    24
    +  /**
    
    25
    +   * Tells whether the browser has been started in portable mode.
    
    26
    +   */
    
    27
    +  readonly attribute bool isPortableMode;
    
    23 28
     };

  • toolkit/xre/nsXREDirProvider.cpp
    ... ... @@ -1334,6 +1334,20 @@ nsresult nsXREDirProvider::GetPortableDataDir(nsIFile** aFile,
    1334 1334
     }
    
    1335 1335
     #endif
    
    1336 1336
     
    
    1337
    +NS_IMETHODIMP nsXREDirProvider::GetIsPortableMode(bool* aIsPortableMode) {
    
    1338
    +#ifdef RELATIVE_DATA_DIR
    
    1339
    +  if (gDataDirPortable) {
    
    1340
    +    *aIsPortableMode = *gDataDirPortable;
    
    1341
    +  } else {
    
    1342
    +    nsCOMPtr<nsIFile> dir;
    
    1343
    +    GetPortableDataDir(getter_AddRefs(dir), *aIsPortableMode);
    
    1344
    +  }
    
    1345
    +#else
    
    1346
    +  *aIsPortableMode = false;
    
    1347
    +#endif
    
    1348
    +  return NS_OK;
    
    1349
    +}
    
    1350
    +
    
    1337 1351
     nsresult nsXREDirProvider::GetUserDataDirectoryHome(nsIFile** aFile,
    
    1338 1352
                                                         bool aLocal) {
    
    1339 1353
       // Copied from nsAppFileLocationProvider (more or less)
    

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits