Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(556)

Unified Diff: chromeos/network/firewall_hole.h

Issue 1108083003: Re-land Move ScopedFileDescriptor to dbus/file_descriptor.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chromeos/network/firewall_hole.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/firewall_hole.h
diff --git a/chromeos/network/firewall_hole.h b/chromeos/network/firewall_hole.h
index 2bd678813210ee0f142e2c1e90590b903a3132a6..e6d119d961c91cc831a9da4a16332cbfbf1e5e06 100644
--- a/chromeos/network/firewall_hole.h
+++ b/chromeos/network/firewall_hole.h
@@ -11,10 +11,7 @@
#include "base/callback_forward.h"
#include "base/memory/scoped_ptr.h"
#include "chromeos/chromeos_export.h"
-
-namespace dbus {
-class FileDescriptor;
-}
+#include "dbus/file_descriptor.h"
namespace chromeos {
@@ -29,14 +26,6 @@ class CHROMEOS_EXPORT FirewallHole {
typedef base::Callback<void(scoped_ptr<FirewallHole>)> OpenCallback;
- // This provides a simple way to pass around file descriptors since they must
- // be closed on a thread that is allowed to perform I/O.
- struct FileDescriptorDeleter {
- void CHROMEOS_EXPORT operator()(dbus::FileDescriptor* fd);
- };
- typedef scoped_ptr<dbus::FileDescriptor, FileDescriptorDeleter>
- ScopedFileDescriptor;
-
// Opens a port on the system firewall for the given network interface (or all
// interfaces if |interface| is ""). The hole will be closed when the object
// provided to the callback is destroyed.
@@ -51,28 +40,28 @@ class CHROMEOS_EXPORT FirewallHole {
static void RequestPortAccess(PortType type,
uint16_t port,
const std::string& interface,
- ScopedFileDescriptor lifeline_local,
- ScopedFileDescriptor lifeline_remote,
+ dbus::ScopedFileDescriptor lifeline_local,
+ dbus::ScopedFileDescriptor lifeline_remote,
const OpenCallback& callback);
static void PortAccessGranted(PortType type,
uint16_t port,
const std::string& interface,
- ScopedFileDescriptor lifeline_fd,
+ dbus::ScopedFileDescriptor lifeline_fd,
const FirewallHole::OpenCallback& callback,
bool success);
FirewallHole(PortType type,
uint16_t port,
const std::string& interface,
- ScopedFileDescriptor lifeline_fd);
+ dbus::ScopedFileDescriptor lifeline_fd);
const PortType type_;
const uint16_t port_;
const std::string interface_;
// A file descriptor used by firewalld to track the lifetime of this process.
- ScopedFileDescriptor lifeline_fd_;
+ dbus::ScopedFileDescriptor lifeline_fd_;
};
} // namespace chromeos
« no previous file with comments | « no previous file | chromeos/network/firewall_hole.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698