blob: aee5426cbcd19247a5a936c0c2374580b6d3a84b (
plain) (
blame)
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
|
--- content/browser/accessibility/browser_accessibility_state_impl_auralinux.cc.orig 2025-07-02 06:08:04 UTC
+++ content/browser/accessibility/browser_accessibility_state_impl_auralinux.cc
@@ -33,7 +33,11 @@ bool CheckCmdlineForOrca(const std::string& cmdline_al
std::string cmdline;
std::stringstream ss(cmdline_all);
while (std::getline(ss, cmdline, '\0')) {
+#if BUILDFLAG(IS_BSD)
+ re2::RE2 orca_regex(R"((^|/)(usr/)?(local/)?bin/orca(\s|$))");
+#else
re2::RE2 orca_regex(R"((^|/)(usr/)?bin/orca(\s|$))");
+#endif
if (re2::RE2::PartialMatch(cmdline, orca_regex)) {
return true; // Orca was found
}
@@ -43,6 +47,10 @@ bool CheckCmdlineForOrca(const std::string& cmdline_al
// Returns true if Orca is active.
bool DiscoverOrca() {
+#if BUILDFLAG(IS_BSD)
+ NOTIMPLEMENTED();
+ return false;
+#else
// NOTE: this method is run from another thread to reduce jank, since
// there's no guarantee these system calls will return quickly.
std::unique_ptr<DIR, decltype(&CloseDir)> proc_dir(opendir("/proc"),
@@ -80,6 +88,7 @@ bool DiscoverOrca() {
}
return is_orca_active;
+#endif
}
} // namespace
|