| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
raw_ptr<dbus::ObjectProxy> proxy_;Mark the pointer as const.
size_t file_index_ = 0;Put this next to `files_`?
std::unique_ptr<FileTransferSession> owned_self_;Can the class just omit this, make its dtor private, and call `delete this` when needed?
auto callbacks = std::move(*pending_callbacks);
pending_callbacks->clear();
for (auto& cb : callbacks) {
std::move(cb).Run(is_available);
}Why does this need to first move the callbacks out of `pending_callbacks`?
base::WeakPtrFactory<SelectionOwner> weak_factory_{this};IWYU
base::WeakPtrFactory<SelectionOwner> weak_factory_{this};Linux-only?
#if BUILDFLAG(IS_LINUX)Should include build_config.h
#if BUILDFLAG(IS_LINUX)Put all the new includes in their own section.
base::WeakPtrFactory<XDragContext> weak_factory_{this};Linux-only
void OnPortalPathsExtracted(std::vector<std::string> paths);IWYU
// Requests the next target from |unfetched_targets_| or completes theUse backticks in new code.
base::WeakPtrFactory<WaylandClipboard> weak_factory_{this};IWYU
// Asynchronously retrieves the mime types list currently available to beAsync, but no callback?
// Asynchronously reads and returns selection data with |mime_type| format.... via `callback`.
// Asynchronously reads and returns selection data with |mime_type| format.Backticks in new code.
void RunRequestDataClosure(PlatformClipboard::RequestDataClosure callback,Is this wrapper necessary? I think the caller can just pass in its `callback` instead of wrapping that callback in RunRequestDataClosure().
base::TimeTicks start_time,
std::map<std::string, std::vector<uint8_t>> fetched_data,
std::vector<std::string> paths);IWYU
// This should not happen since we already validated the serial inShould this CHECK() instead?
base::WeakPtrFactory<X11ClipboardOzone> weak_factory_{this};Linux-only
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Commit-Queue | +1 |
Mark the pointer as const.
Done
Put this next to `files_`?
Done
Can the class just omit this, make its dtor private, and call `delete this` when needed?
Done
auto callbacks = std::move(*pending_callbacks);
pending_callbacks->clear();
for (auto& cb : callbacks) {
std::move(cb).Run(is_available);
}Why does this need to first move the callbacks out of `pending_callbacks`?
Removed
base::WeakPtrFactory<SelectionOwner> weak_factory_{this};Thomas AndersonLinux-only?
Done
base::WeakPtrFactory<SelectionOwner> weak_factory_{this};Thomas AndersonIWYU
Done
#if BUILDFLAG(IS_LINUX)Thomas AndersonShould include build_config.h
Done
Put all the new includes in their own section.
Done
base::WeakPtrFactory<XDragContext> weak_factory_{this};Thomas AndersonLinux-only
Done
void OnPortalPathsExtracted(std::vector<std::string> paths);Thomas AndersonIWYU
Done
// Requests the next target from |unfetched_targets_| or completes theUse backticks in new code.
Done
#include "build/build_config.h"Thomas AndersonNo longer needed?
Done
base::WeakPtrFactory<WaylandClipboard> weak_factory_{this};Thomas AndersonIWYU
Done
// Asynchronously retrieves the mime types list currently available to beThomas AndersonAsync, but no callback?
Fixed the comment.
// Asynchronously reads and returns selection data with |mime_type| format.Thomas AndersonBackticks in new code.
Done
// Asynchronously reads and returns selection data with |mime_type| format.Thomas Anderson... via `callback`.
Done
void RunRequestDataClosure(PlatformClipboard::RequestDataClosure callback,Is this wrapper necessary? I think the caller can just pass in its `callback` instead of wrapping that callback in RunRequestDataClosure().
Done
base::TimeTicks start_time,
std::map<std::string, std::vector<uint8_t>> fetched_data,
std::vector<std::string> paths);Thomas AndersonIWYU
Done
// This should not happen since we already validated the serial inThomas AndersonShould this CHECK() instead?
Done
base::WeakPtrFactory<X11ClipboardOzone> weak_factory_{this};Thomas AndersonLinux-only
Done
std::vector<x11::Atom> uri_list_atoms,Thomas AndersonIWYU
Done
#include "ui/gfx/x/atom_cache.h"Thomas AndersonLinux-only
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
size_t file_index_ = 0;Thomas AndersonPut this next to `files_`?
Done
Still need to move up.
#include "base/strings/string_view_util.h"Also move this and line 15 into the line 24 block.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +0 |
| Commit-Queue | +2 |
size_t file_index_ = 0;Thomas AndersonPut this next to `files_`?
Lei ZhangDone
Still need to move up.
Done
Also move this and line 15 into the line 24 block.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
8 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: ui/base/x/selection_owner.cc
Insertions: 2, Deletions: 2.
@@ -10,9 +10,7 @@
#include "base/containers/flat_set.h"
#include "base/logging.h"
#include "base/memory/ref_counted_memory.h"
-#include "base/strings/string_view_util.h"
#include "base/time/time.h"
-#include "ui/base/clipboard/clipboard_constants.h"
#include "ui/base/x/selection_utils.h"
#include "ui/base/x/x11_util.h"
#include "ui/events/platform/x11/x11_event_source.h"
@@ -21,6 +19,8 @@
#include "ui/gfx/x/xproto.h"
#if BUILDFLAG(IS_LINUX)
+#include "base/strings/string_view_util.h"
+#include "ui/base/clipboard/clipboard_constants.h"
#include "ui/base/clipboard/clipboard_util_linux.h"
#endif
```
```
The name of the file: components/dbus/xdg/file_transfer_portal.cc
Insertions: 1, Deletions: 1.
@@ -176,10 +176,10 @@
}
const std::vector<std::string> files_;
+ size_t file_index_ = 0;
std::string key_;
base::OnceCallback<void(std::string)> callback_;
const raw_ptr<dbus::ObjectProxy> proxy_;
- size_t file_index_ = 0;
bool any_files_added_ = false;
};
```
[Linux] Make dbus_xdg::FileTransferPortal asynchronous.
This change converts all dbus_xdg::FileTransferPortal methods from
synchronous to asynchronous. It transitions the X11 and Wayland
clipboard and drag-and-drop implementations to a lazy evaluation model
for file transfers via the portal.
Key changes:
- dbus_xdg::FileTransferPortal now uses dbus_utils::CallMethod and
performs file opening on a background ThreadPool.
- X11: SelectionOwner now lazily advertises portal atoms and generates
portal keys on-demand in OnSelectionRequest. X11ClipboardOzone
implements an async portal fallback for text/uri-list.
- Wayland: WaylandDataSource::Delegate now supports async
OnDataSourceSend, allowing on-demand portal key generation.
WaylandDataDragController and wl::ClipboardImpl now advertise portal
support immediately but only register with the portal when data is
requested.
- Fixed a bug in WaylandDataDragController where non-file drag data
was discarded when files were present.
- Updated FileTransferPortalTest and WaylandClipboardTest to support
the new asynchronous flows.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |