Commit cb4de010 authored by Kathleen Brade's avatar Kathleen Brade Committed by Georg Koppen
Browse files

Bug #11641: change TBB directory structure to be more like Firefox's

Unless the -osint command line flag is used, the browser now defaults
to the equivalent of -no-remote.  There is a new -allow-remote flag that
may be used to restore the original (Firefox-like) default behavior.
parent a04b8a3b
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -1559,7 +1559,8 @@ DumpHelp()
         "  --profile <path>   Start with profile at <path>.\n"
         "  --migration        Start with migration wizard.\n"
         "  --ProfileManager   Start with ProfileManager.\n"
         "  --no-remote        Do not accept or send remote commands; implies --new-instance.\n"
         "  --no-remote        (default) Do not accept or send remote commands; implies --new-instance.\n"
         "  --allow-remote     Accept and send remote commands.\n"
         "  --new-instance     Open new instance, not a new window in running instance.\n"
         "  --UILocale <locale> Start with <locale> resources as UI Locale.\n"
         "  --safe-mode        Disables extensions and themes for this session.\n", gAppData->name);
@@ -3554,6 +3555,12 @@ XREMain::XRE_mainInit(bool* aExitFlag)
    gSafeMode = true;
#endif

  // In the Tor Browser, remoting is disabled by default unless -osint is used.
  bool allowRemote = (CheckArg("allow-remote") == ARG_FOUND);
  if (!allowRemote && (CheckArg("osint", false, nullptr, false) != ARG_FOUND)) {
    SaveToEnv("MOZ_NO_REMOTE=1");
  }

  // Handle --no-remote and --new-instance command line arguments. Setup
  // the environment to better accommodate other components and various
  // restart scenarios.
@@ -3561,8 +3568,9 @@ XREMain::XRE_mainInit(bool* aExitFlag)
  if (ar == ARG_BAD) {
    PR_fprintf(PR_STDERR, "Error: argument --no-remote is invalid when argument --osint is specified\n");
    return 1;
  } else if (ar == ARG_FOUND) {
    SaveToEnv("MOZ_NO_REMOTE=1");
  } else if ((ar == ARG_FOUND) && allowRemote) {
    PR_fprintf(PR_STDERR, "Error: argument --no-remote is invalid when argument --allow-remote is specified\n");
    return 1;
  }

  ar = CheckArg("new-instance", true);