1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
--- chrome/common/chrome_paths.cc.orig 2024-06-17 12:56:06 UTC
+++ chrome/common/chrome_paths.cc
@@ -30,7 +30,7 @@
#include "base/apple/foundation_util.h"
#endif
-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_OPENBSD)
+#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
#include "components/policy/core/common/policy_paths.h"
#endif
@@ -52,14 +52,14 @@
namespace {
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
// The path to the external extension <id>.json files.
// /usr/share seems like a good choice, see: http://www.pathname.com/fhs/
const base::FilePath::CharType kFilepathSinglePrefExtensions[] =
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
- FILE_PATH_LITERAL("/usr/share/google-chrome/extensions");
+ FILE_PATH_LITERAL("/usr/local/share/chromium/extensions");
#else
- FILE_PATH_LITERAL("/usr/share/chromium/extensions");
+ FILE_PATH_LITERAL("/usr/local/share/chromium/extensions");
#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
@@ -225,7 +225,7 @@ bool PathProvider(int key, base::FilePath* result) {
}
break;
case chrome::DIR_DEFAULT_DOWNLOADS_SAFE:
-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
if (!GetUserDownloadsDirectorySafe(&cur)) {
return false;
}
@@ -541,7 +541,7 @@ bool PathProvider(int key, base::FilePath* result) {
return false;
}
break;
-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_OPENBSD)
+#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
case chrome::DIR_POLICY_FILES: {
cur = base::FilePath(policy::kPolicyPath);
break;
@@ -552,7 +552,7 @@ bool PathProvider(int key, base::FilePath* result) {
#if BUILDFLAG(IS_CHROMEOS_ASH) || \
((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \
BUILDFLAG(CHROMIUM_BRANDING)) || \
- BUILDFLAG(IS_MAC)
+ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
case chrome::DIR_USER_EXTERNAL_EXTENSIONS: {
if (!base::PathService::Get(chrome::DIR_USER_DATA, &cur)) {
return false;
@@ -561,7 +561,7 @@ bool PathProvider(int key, base::FilePath* result) {
break;
}
#endif
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
case chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS: {
cur = base::FilePath(kFilepathSinglePrefExtensions);
break;
@@ -599,7 +599,7 @@ bool PathProvider(int key, base::FilePath* result) {
break;
#if BUILDFLAG(ENABLE_EXTENSIONS) && \
- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC))
+ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD))
case chrome::DIR_NATIVE_MESSAGING:
#if BUILDFLAG(IS_MAC)
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
@@ -613,6 +613,9 @@ bool PathProvider(int key, base::FilePath* result) {
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
cur = base::FilePath(
FILE_PATH_LITERAL("/etc/opt/chrome/native-messaging-hosts"));
+#elif BUILDFLAG(IS_FREEBSD)
+ cur = base::FilePath(FILE_PATH_LITERAL(
+ "/usr/local/etc/chromium/native-messaging-hosts"));
#else
cur = base::FilePath(
FILE_PATH_LITERAL("/etc/chromium/native-messaging-hosts"));
|