BrowserDefines.h (1078B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */ 3 /* This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ 6 7 #ifndef mozilla_BrowserDefines_h 8 #define mozilla_BrowserDefines_h 9 10 #include "mozilla/CmdLineAndEnvUtils.h" 11 12 namespace mozilla { 13 namespace browser { 14 constexpr static const char* kRequiredArguments[] = {"url", "private-window"}; 15 #ifdef XP_WIN 16 # define ATTEMPTING_DEELEVATION_FLAG "attempting-deelevation" 17 constexpr static const char* kOptionalArguments[] = { 18 ATTEMPTING_DEELEVATION_FLAG}; 19 #else 20 constexpr static auto kOptionalArguments = nullptr; 21 #endif 22 } // namespace browser 23 24 template <typename CharT> 25 inline void EnsureBrowserCommandlineSafe(int aArgc, CharT** aArgv) { 26 mozilla::EnsureCommandlineSafe(aArgc, aArgv, browser::kRequiredArguments, 27 browser::kOptionalArguments); 28 } 29 } // namespace mozilla 30 31 #endif