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

Unified Diff: webkit/browser/fileapi/sandbox_origin_database_unittest.cc

Issue 167403002: Remove some PlatformFile uses from WebKit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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: webkit/browser/fileapi/sandbox_origin_database_unittest.cc
diff --git a/webkit/browser/fileapi/sandbox_origin_database_unittest.cc b/webkit/browser/fileapi/sandbox_origin_database_unittest.cc
index 75781152410edfae8e262897649025704499fec4..dd870ebd3d6497e2998714b4b52f29a37409445b 100644
--- a/webkit/browser/fileapi/sandbox_origin_database_unittest.cc
+++ b/webkit/browser/fileapi/sandbox_origin_database_unittest.cc
@@ -9,9 +9,9 @@
#include <vector>
#include "base/file_util.h"
+#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
-#include "base/platform_file.h"
#include "base/stl_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/leveldatabase/src/db/filename.h"
@@ -224,15 +224,10 @@ TEST(SandboxOriginDatabaseTest, DatabaseRecoveryTest) {
const base::FilePath kGarbageDir = kFSDir.AppendASCII("foo");
const base::FilePath kGarbageFile = kGarbageDir.AppendASCII("bar");
EXPECT_TRUE(base::CreateDirectory(kGarbageDir));
- bool created = false;
- base::PlatformFileError error;
- base::PlatformFile file = base::CreatePlatformFile(
- kGarbageFile,
- base::PLATFORM_FILE_CREATE | base::PLATFORM_FILE_WRITE,
- &created, &error);
- EXPECT_EQ(base::PLATFORM_FILE_OK, error);
- EXPECT_TRUE(created);
- EXPECT_TRUE(base::ClosePlatformFile(file));
+ base::File file(kGarbageFile,
+ base::File::FLAG_CREATE | base::File::FLAG_WRITE);
+ EXPECT_TRUE(file.IsValid());
+ file.Close();
// Corrupt database itself and last log entry to drop last 1 database
// operation. The database should detect the corruption and should recover
« no previous file with comments | « webkit/browser/fileapi/sandbox_database_test_helper.cc ('k') | webkit/browser/fileapi/sandbox_prioritized_origin_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698