summaryrefslogtreecommitdiffstats
path: root/sql
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-17 23:11:12 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-17 23:11:12 +0000
commitb9b4a5729940325f9ac2bac2e9a50a5e8f7dcbb1 (patch)
treec340bd113fa8067f7ff2d06a6c74c93d21137e83 /sql
parent3ae4c4256483e50b325ef0d5f8d6ecd153fa5f4a (diff)
downloadchromium_src-b9b4a5729940325f9ac2bac2e9a50a5e8f7dcbb1.zip
chromium_src-b9b4a5729940325f9ac2bac2e9a50a5e8f7dcbb1.tar.gz
chromium_src-b9b4a5729940325f9ac2bac2e9a50a5e8f7dcbb1.tar.bz2
Move ScopedFILE to base namespace and scoped_file.h
R=viettrungluu@chromium.org Review URL: https://codereview.chromium.org/196073002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257518 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sql')
-rw-r--r--sql/connection_unittest.cc7
-rw-r--r--sql/test/test_helpers.cc5
2 files changed, 7 insertions, 5 deletions
diff --git a/sql/connection_unittest.cc b/sql/connection_unittest.cc
index 304ddcd..c0a0641 100644
--- a/sql/connection_unittest.cc
+++ b/sql/connection_unittest.cc
@@ -4,6 +4,7 @@
#include "base/bind.h"
#include "base/file_util.h"
+#include "base/files/scoped_file.h"
#include "base/files/scoped_temp_dir.h"
#include "base/logging.h"
#include "sql/connection.h"
@@ -423,7 +424,7 @@ TEST_F(SQLConnectionTest, RazeEmptyDB) {
db().Close();
{
- file_util::ScopedFILE file(base::OpenFile(db_path(), "rb+"));
+ base::ScopedFILE file(base::OpenFile(db_path(), "rb+"));
ASSERT_TRUE(file.get() != NULL);
ASSERT_EQ(0, fseek(file.get(), 0, SEEK_SET));
ASSERT_TRUE(base::TruncateFile(file.get()));
@@ -441,7 +442,7 @@ TEST_F(SQLConnectionTest, RazeNOTADB) {
ASSERT_FALSE(base::PathExists(db_path()));
{
- file_util::ScopedFILE file(base::OpenFile(db_path(), "wb"));
+ base::ScopedFILE file(base::OpenFile(db_path(), "wb"));
ASSERT_TRUE(file.get() != NULL);
const char* kJunk = "This is the hour of our discontent.";
@@ -474,7 +475,7 @@ TEST_F(SQLConnectionTest, RazeNOTADB2) {
db().Close();
{
- file_util::ScopedFILE file(base::OpenFile(db_path(), "rb+"));
+ base::ScopedFILE file(base::OpenFile(db_path(), "rb+"));
ASSERT_TRUE(file.get() != NULL);
ASSERT_EQ(0, fseek(file.get(), 0, SEEK_SET));
diff --git a/sql/test/test_helpers.cc b/sql/test/test_helpers.cc
index fb055cf..2952821 100644
--- a/sql/test/test_helpers.cc
+++ b/sql/test/test_helpers.cc
@@ -7,6 +7,7 @@
#include <string>
#include "base/file_util.h"
+#include "base/files/scoped_file.h"
#include "sql/connection.h"
#include "sql/statement.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -75,7 +76,7 @@ bool CorruptSizeInHeader(const base::FilePath& db_path) {
unsigned char header[kHeaderSize];
- file_util::ScopedFILE file(base::OpenFile(db_path, "rb+"));
+ base::ScopedFILE file(base::OpenFile(db_path, "rb+"));
if (!file.get())
return false;
@@ -128,7 +129,7 @@ bool CorruptTableOrIndex(const base::FilePath& db_path,
scoped_ptr<char[]> page_buf(new char[page_size]);
// Get the page into page_buf.
- file_util::ScopedFILE file(base::OpenFile(db_path, "rb+"));
+ base::ScopedFILE file(base::OpenFile(db_path, "rb+"));
if (!file.get())
return false;
if (0 != fseek(file.get(), page_ofs, SEEK_SET))