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

Unified Diff: sandbox/linux/services/credentials_unittest.cc

Issue 197873014: Revert of Implement ScopedFD in terms of ScopedGeneric. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
Index: sandbox/linux/services/credentials_unittest.cc
diff --git a/sandbox/linux/services/credentials_unittest.cc b/sandbox/linux/services/credentials_unittest.cc
index a54ed04ab783379a8da0a899fbae28be4dadad97..9b792aa8c555990fc2d5bb536189f29b88b3e6fd 100644
--- a/sandbox/linux/services/credentials_unittest.cc
+++ b/sandbox/linux/services/credentials_unittest.cc
@@ -12,11 +12,12 @@
#include <unistd.h>
#include "base/file_util.h"
-#include "base/files/scoped_file.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "sandbox/linux/tests/unit_tests.h"
#include "testing/gtest/include/gtest/gtest.h"
+
+using file_util::ScopedFD;
namespace sandbox {
@@ -64,7 +65,7 @@
{
// Have a "/dev" file descriptor around.
int dev_fd = open("/dev", O_RDONLY | O_DIRECTORY);
- base::ScopedFD dev_fd_closer(dev_fd);
+ ScopedFD dev_fd_closer(&dev_fd);
EXPECT_TRUE(creds.HasOpenDirectory(-1));
}
EXPECT_FALSE(creds.HasOpenDirectory(-1));
@@ -74,7 +75,7 @@
Credentials creds;
int proc_fd = open("/proc", O_RDONLY | O_DIRECTORY);
- base::ScopedFD proc_fd_closer(proc_fd);
+ ScopedFD proc_fd_closer(&proc_fd);
ASSERT_LE(0, proc_fd);
// Don't pass |proc_fd|, an open directory (proc_fd) should
@@ -86,7 +87,7 @@
{
// Have a "/dev" file descriptor around.
int dev_fd = open("/dev", O_RDONLY | O_DIRECTORY);
- base::ScopedFD dev_fd_closer(dev_fd);
+ ScopedFD dev_fd_closer(&dev_fd);
EXPECT_TRUE(creds.HasOpenDirectory(proc_fd));
}
« no previous file with comments | « sandbox/linux/services/broker_process_unittest.cc ('k') | sandbox/linux/services/scoped_process_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698