From 7567484144da059e2c2c2a818b06660a5459052f Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Thu, 11 Jul 2013 17:36:07 +0000 Subject: Move PathExists to base namespace. BUG= TBR=jam@chromium.org Review URL: https://codereview.chromium.org/18286004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211147 0039d316-1c4b-4281-b951-d872f2087c98 --- sql/connection.cc | 6 +++--- sql/connection_unittest.cc | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'sql') diff --git a/sql/connection.cc b/sql/connection.cc index f04eb3b..ac8c0cd 100644 --- a/sql/connection.cc +++ b/sql/connection.cc @@ -449,9 +449,9 @@ bool Connection::Delete(const base::FilePath& path) { base::Delete(wal_path, false); base::Delete(path, false); - return !file_util::PathExists(journal_path) && - !file_util::PathExists(wal_path) && - !file_util::PathExists(path); + return !base::PathExists(journal_path) && + !base::PathExists(wal_path) && + !base::PathExists(path); } bool Connection::BeginTransaction() { diff --git a/sql/connection_unittest.cc b/sql/connection_unittest.cc index c85382f..37cb750 100644 --- a/sql/connection_unittest.cc +++ b/sql/connection_unittest.cc @@ -325,7 +325,7 @@ TEST_F(SQLConnectionTest, RazeEmptyDB) { TEST_F(SQLConnectionTest, RazeNOTADB) { db().Close(); sql::Connection::Delete(db_path()); - ASSERT_FALSE(file_util::PathExists(db_path())); + ASSERT_FALSE(base::PathExists(db_path())); { file_util::ScopedFILE file(file_util::OpenFile(db_path(), "w")); @@ -334,7 +334,7 @@ TEST_F(SQLConnectionTest, RazeNOTADB) { const char* kJunk = "This is the hour of our discontent."; fputs(kJunk, file.get()); } - ASSERT_TRUE(file_util::PathExists(db_path())); + ASSERT_TRUE(base::PathExists(db_path())); // SQLite will successfully open the handle, but will fail with // SQLITE_IOERR_SHORT_READ on pragma statemenets which read the @@ -551,12 +551,12 @@ TEST_F(SQLConnectionTest, Delete) { // Should have both a main database file and a journal file because // of journal_mode PERSIST. base::FilePath journal(db_path().value() + FILE_PATH_LITERAL("-journal")); - ASSERT_TRUE(file_util::PathExists(db_path())); - ASSERT_TRUE(file_util::PathExists(journal)); + ASSERT_TRUE(base::PathExists(db_path())); + ASSERT_TRUE(base::PathExists(journal)); sql::Connection::Delete(db_path()); - EXPECT_FALSE(file_util::PathExists(db_path())); - EXPECT_FALSE(file_util::PathExists(journal)); + EXPECT_FALSE(base::PathExists(db_path())); + EXPECT_FALSE(base::PathExists(journal)); } } // namespace -- cgit v1.1