Files
Aleksei Khoroshilov a41bf5350b Replace "src/" includes with <> in chromium_src. (#30096)
This change updates how brave/chromium_src overrides can reference original files: it adds ability to use #include <...> along with #include "src/...". This is enabled by replacing -I../../brave/chromium_src with -iquote../../brave_chromium_src, which adds an include search path only for #include "..." directives.

With this approach, other files in the build tree can reference brave/chromium_src overrides using #include "...", while the overrides themselves can reference original Chromium files using #include <...>. Since Chromium uses #include "..." for all in-tree files, we can leverage this convention and configure our overrides so that we can drop support for #include "src/" later by removing -I../../.. and making rbe_exec_root modification obsolete (the main goal).
2025-07-24 17:37:44 +07:00

50 lines
1.5 KiB
C++

/* Copyright (c) 2019 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "base/notreached.h"
#include "build/build_config.h"
#include "ui/base/l10n/l10n_util.h"
#if !BUILDFLAG(IS_WIN)
#include "chrome/grit/generated_resources.h"
#define GetAppShortcutsSubdirName GetAppShortcutsSubdirName_UnUsed
#endif
#include <chrome/browser/shell_integration.cc>
#if !BUILDFLAG(IS_WIN)
#undef GetAppShortcutsSubdirName
#endif
#if !BUILDFLAG(IS_WIN)
namespace shell_integration {
std::u16string GetAppShortcutsSubdirName() {
int id = IDS_APP_SHORTCUTS_SUBDIR_NAME_BRAVE_STABLE;
switch (chrome::GetChannel()) {
case version_info::Channel::STABLE:
id = IDS_APP_SHORTCUTS_SUBDIR_NAME_BRAVE_STABLE;
break;
case version_info::Channel::BETA:
id = IDS_APP_SHORTCUTS_SUBDIR_NAME_BRAVE_BETA;
break;
case version_info::Channel::DEV:
id = IDS_APP_SHORTCUTS_SUBDIR_NAME_BRAVE_DEV;
break;
case version_info::Channel::CANARY:
id = IDS_APP_SHORTCUTS_SUBDIR_NAME_BRAVE_NIGHTLY;
break;
case version_info::Channel::UNKNOWN:
id = IDS_APP_SHORTCUTS_SUBDIR_NAME_BRAVE_DEVELOPMENT;
break;
default:
NOTREACHED() << "All possible channels are handled above.";
}
return l10n_util::GetStringUTF16(id);
}
} // namespace shell_integration
#endif // !BUILDFLAG(IS_WIN)