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

Unified Diff: sql/connection_unittest.cc

Issue 89523002: Move Posix file utils to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | « sql/connection.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sql/connection_unittest.cc
diff --git a/sql/connection_unittest.cc b/sql/connection_unittest.cc
index 5ffc26a8be44f4c3b608d3872347d7a4005dadfe..c6811b4dc5921a36f5eb51b0de3265cbcfd43ddd 100644
--- a/sql/connection_unittest.cc
+++ b/sql/connection_unittest.cc
@@ -689,12 +689,12 @@ TEST_F(SQLConnectionTest, UserPermission) {
// read access for the database and journal.
ASSERT_TRUE(base::PathExists(db_path()));
ASSERT_TRUE(base::PathExists(journal));
- mode = file_util::FILE_PERMISSION_MASK;
- EXPECT_TRUE(file_util::GetPosixFilePermissions(db_path(), &mode));
- ASSERT_NE((mode & file_util::FILE_PERMISSION_USER_MASK), mode);
- mode = file_util::FILE_PERMISSION_MASK;
- EXPECT_TRUE(file_util::GetPosixFilePermissions(journal, &mode));
- ASSERT_NE((mode & file_util::FILE_PERMISSION_USER_MASK), mode);
+ mode = base::FILE_PERMISSION_MASK;
+ EXPECT_TRUE(base::GetPosixFilePermissions(db_path(), &mode));
+ ASSERT_NE((mode & base::FILE_PERMISSION_USER_MASK), mode);
+ mode = base::FILE_PERMISSION_MASK;
+ EXPECT_TRUE(base::GetPosixFilePermissions(journal, &mode));
+ ASSERT_NE((mode & base::FILE_PERMISSION_USER_MASK), mode);
// Re-open with restricted permissions and verify that the modes
// changed for both the main database and the journal.
@@ -703,12 +703,12 @@ TEST_F(SQLConnectionTest, UserPermission) {
ASSERT_TRUE(db().Open(db_path()));
ASSERT_TRUE(base::PathExists(db_path()));
ASSERT_TRUE(base::PathExists(journal));
- mode = file_util::FILE_PERMISSION_MASK;
- EXPECT_TRUE(file_util::GetPosixFilePermissions(db_path(), &mode));
- ASSERT_EQ((mode & file_util::FILE_PERMISSION_USER_MASK), mode);
- mode = file_util::FILE_PERMISSION_MASK;
- EXPECT_TRUE(file_util::GetPosixFilePermissions(journal, &mode));
- ASSERT_EQ((mode & file_util::FILE_PERMISSION_USER_MASK), mode);
+ mode = base::FILE_PERMISSION_MASK;
+ EXPECT_TRUE(base::GetPosixFilePermissions(db_path(), &mode));
+ ASSERT_EQ((mode & base::FILE_PERMISSION_USER_MASK), mode);
+ mode = base::FILE_PERMISSION_MASK;
+ EXPECT_TRUE(base::GetPosixFilePermissions(journal, &mode));
+ ASSERT_EQ((mode & base::FILE_PERMISSION_USER_MASK), mode);
// Delete and re-create the database, the restriction should still apply.
db().Close();
@@ -716,16 +716,16 @@ TEST_F(SQLConnectionTest, UserPermission) {
ASSERT_TRUE(db().Open(db_path()));
ASSERT_TRUE(base::PathExists(db_path()));
ASSERT_FALSE(base::PathExists(journal));
- mode = file_util::FILE_PERMISSION_MASK;
- EXPECT_TRUE(file_util::GetPosixFilePermissions(db_path(), &mode));
- ASSERT_EQ((mode & file_util::FILE_PERMISSION_USER_MASK), mode);
+ mode = base::FILE_PERMISSION_MASK;
+ EXPECT_TRUE(base::GetPosixFilePermissions(db_path(), &mode));
+ ASSERT_EQ((mode & base::FILE_PERMISSION_USER_MASK), mode);
// Verify that journal creation inherits the restriction.
EXPECT_TRUE(db().Execute("CREATE TABLE x (x)"));
ASSERT_TRUE(base::PathExists(journal));
- mode = file_util::FILE_PERMISSION_MASK;
- EXPECT_TRUE(file_util::GetPosixFilePermissions(journal, &mode));
- ASSERT_EQ((mode & file_util::FILE_PERMISSION_USER_MASK), mode);
+ mode = base::FILE_PERMISSION_MASK;
+ EXPECT_TRUE(base::GetPosixFilePermissions(journal, &mode));
+ ASSERT_EQ((mode & base::FILE_PERMISSION_USER_MASK), mode);
}
#endif // defined(OS_POSIX)
« no previous file with comments | « sql/connection.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698