| Auto-Submit | +1 |
| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
#include "base/files/file_descriptor_watcher_posix.h"Should this be in a platform-specific section?
std::unique_ptr<base::FileDescriptorWatcher> file_descriptor_watcher;
file_descriptor_watcher = std::make_unique<base::FileDescriptorWatcher>(
io_task_runner->task_runner());It looks like you want to create and destroy a temporary object on this thread. Can this be simplified to:
```suggestion
std::make_unique<base::FileDescriptorWatcher>(
io_task_runner->task_runner());
```
or maybe create it on the stack:
```suggestion
base::FileDescriptorWatcher fd_watcher(
io_task_runner->task_runner());
```
return std::ranges::find(xdg_current_desktop_values, "GNOME") !=
xdg_current_desktop_values.end();```suggestion
return std::ranges::contains(xdg_current_desktop_values, "GNOME");
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
#include "base/files/file_descriptor_watcher_posix.h"Should this be in a platform-specific section?
Ah, you've fixed this already 😊
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Commit-Queue | +2 |
std::unique_ptr<base::FileDescriptorWatcher> file_descriptor_watcher;
file_descriptor_watcher = std::make_unique<base::FileDescriptorWatcher>(
io_task_runner->task_runner());It looks like you want to create and destroy a temporary object on this thread. Can this be simplified to:
```suggestion
std::make_unique<base::FileDescriptorWatcher>(
io_task_runner->task_runner());
```or maybe create it on the stack:
```suggestion
base::FileDescriptorWatcher fd_watcher(
io_task_runner->task_runner());
```
Technically speaking it's not "temporary", since it needs to be alive as long as the RunLoop is running. Creating the watcher on the stack works, so I just made it this way.
return std::ranges::find(xdg_current_desktop_values, "GNOME") !=
xdg_current_desktop_values.end();```suggestion
return std::ranges::contains(xdg_current_desktop_values, "GNOME");
```
Done. That's much better :)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
3 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: remoting/host/linux/gnome_remote_desktop_session.cc
Insertions: 1, Deletions: 2.
@@ -94,8 +94,7 @@
auto xdg_current_desktop_values = base::SplitString(
xdg_current_desktop, ":", base::WhitespaceHandling::TRIM_WHITESPACE,
base::SplitResult::SPLIT_WANT_NONEMPTY);
- return std::ranges::find(xdg_current_desktop_values, "GNOME") !=
- xdg_current_desktop_values.end();
+ return std::ranges::contains(xdg_current_desktop_values, "GNOME");
}
// static
```
```
The name of the file: remoting/host/desktop_process_main.cc
Insertions: 1, Deletions: 3.
@@ -93,9 +93,7 @@
// Allow the main thread (which is not an I/O thread) to use
// FileDescriptorWatcher. The constructor of FileDescriptorWatcher registers
// itself in a thread local storage.
- std::unique_ptr<base::FileDescriptorWatcher> file_descriptor_watcher;
- file_descriptor_watcher = std::make_unique<base::FileDescriptorWatcher>(
- io_task_runner->task_runner());
+ base::FileDescriptorWatcher fd_watcher(io_task_runner->task_runner());
#endif
mojo::core::ScopedIPCSupport ipc_support(
```
[crd host][linux] Fix GnomeRemoteDesktopSession in multi-process host
1. XDG_CURRENT_DESKTOP is a colon-separated list, and for the greeter
session, it turns out to be `GNOME-Greeter:GNOME`, so this CL fixes
the logic checking XDG_CURRENT_DESKTOP.
2. EiSenderSession uses FileDescriptorWatcher to watch for the EIS FD.
However, it seems to be run on the main UI thread, which does not
have an associated FileDescriptorWatcher, causing segfault. This CL
fixes it.
3. GDM does not launch the GNOME shell with the `--headless` flag, so
GnomeHeadlessDetector doesn't work. However, given the desktop
process in multi-process mode will always be run in a GDM remote
display, we can assume that the session is always headless for now.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |