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

Unified Diff: content/browser/loader/resource_loader_unittest.cc

Issue 212603021: Remove PlatformFile from resource_loader_unittest (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
« no previous file with comments | « no previous file | net/base/mock_file_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/resource_loader_unittest.cc
diff --git a/content/browser/loader/resource_loader_unittest.cc b/content/browser/loader/resource_loader_unittest.cc
index c4183d0d85f6689e0f75e4bc333393b07eb70383..3fff7beefa0003c6972c43be90665cd0079c1af4 100644
--- a/content/browser/loader/resource_loader_unittest.cc
+++ b/content/browser/loader/resource_loader_unittest.cc
@@ -431,21 +431,15 @@ class ResourceLoaderRedirectToFileTest : public ResourceLoaderTest {
net::URLRequest* request) OVERRIDE {
// Make a temporary file.
CHECK(base::CreateTemporaryFile(&temp_path_));
- base::PlatformFile platform_file =
- base::CreatePlatformFile(temp_path_,
- base::PLATFORM_FILE_WRITE |
- base::PLATFORM_FILE_TEMPORARY |
- base::PLATFORM_FILE_CREATE_ALWAYS |
- base::PLATFORM_FILE_ASYNC,
- NULL, NULL);
- CHECK_NE(base::kInvalidPlatformFileValue, platform_file);
+ int flags = base::File::FLAG_WRITE | base::File::FLAG_TEMPORARY |
+ base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_ASYNC;
+ base::File file(temp_path_, flags);
+ CHECK(file.IsValid());
// Create mock file streams and a ShareableFileReference.
scoped_ptr<net::testing::MockFileStream> file_stream(
- new net::testing::MockFileStream(
- platform_file,
- base::PLATFORM_FILE_WRITE | base::PLATFORM_FILE_ASYNC,
- NULL, base::MessageLoopProxy::current()));
+ new net::testing::MockFileStream(file.Pass(), NULL,
+ base::MessageLoopProxy::current()));
file_stream_ = file_stream.get();
deletable_file_ = ShareableFileReference::GetOrCreate(
temp_path_,
« no previous file with comments | « no previous file | net/base/mock_file_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698