diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-08 22:32:07 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-08 22:32:07 +0000 |
commit | 5ab2191f4bf80656bdec435141531f18c07859c4 (patch) | |
tree | 3f458c1f9cbba24a530cf2f1d4965c7e65517376 /content/browser/download | |
parent | 2098fc80beaf21ef93d7fe3e886d185ce871b423 (diff) | |
download | chromium_src-5ab2191f4bf80656bdec435141531f18c07859c4.zip chromium_src-5ab2191f4bf80656bdec435141531f18c07859c4.tar.gz chromium_src-5ab2191f4bf80656bdec435141531f18c07859c4.tar.bz2 |
Back out r121064 from the trunk due to a compile failure.
http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Builder%20%28dbg%29/builds/16/steps/compile/logs/stdio
net: Rename FileStream::Open/Close with OpenSync/CloseSync.
This is in preparation for implementing async versions of Open()
and Close().
The existing clients are changed to use OpenSync/CloseSync.
No logic is changed.
TEST=try bots to confirm everythign is built as before.
BUG=72001
Review URL: http://codereview.chromium.org/9349005
TBR=satorux@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9363036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121075 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/download')
-rw-r--r-- | content/browser/download/base_file.cc | 4 | ||||
-rw-r--r-- | content/browser/download/base_file_unittest.cc | 2 | ||||
-rw-r--r-- | content/browser/download/download_manager_impl_unittest.cc | 2 | ||||
-rw-r--r-- | content/browser/download/drag_download_util.cc | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/content/browser/download/base_file.cc b/content/browser/download/base_file.cc index 51ff531..74e9b95 100644 --- a/content/browser/download/base_file.cc +++ b/content/browser/download/base_file.cc @@ -502,7 +502,7 @@ net::Error BaseFile::Open() { if (!file_stream_.get()) { CreateFileStream(); file_stream_->EnableErrorStatistics(); - int open_result = file_stream_->OpenSync( + int open_result = file_stream_->Open( full_path_, base::PLATFORM_FILE_OPEN_ALWAYS | base::PLATFORM_FILE_WRITE); if (open_result != net::OK) @@ -535,7 +535,7 @@ void BaseFile::Close() { // theres not much we can do. But we might in the future. file_stream_->Flush(); #endif - file_stream_->CloseSync(); + file_stream_->Close(); ClearStream(net::OK); } } diff --git a/content/browser/download/base_file_unittest.cc b/content/browser/download/base_file_unittest.cc index a25ba60..2ed3b9d 100644 --- a/content/browser/download/base_file_unittest.cc +++ b/content/browser/download/base_file_unittest.cc @@ -121,7 +121,7 @@ class BaseFileTest : public testing::Test { // Create a new file stream. mock_file_stream_.reset(new net::testing::MockFileStream(NULL)); - if (mock_file_stream_->OpenSync( + if (mock_file_stream_->Open( path, base::PLATFORM_FILE_OPEN_ALWAYS | base::PLATFORM_FILE_WRITE) != 0) { mock_file_stream_.reset(); diff --git a/content/browser/download/download_manager_impl_unittest.cc b/content/browser/download/download_manager_impl_unittest.cc index a86e9e1..323e267 100644 --- a/content/browser/download/download_manager_impl_unittest.cc +++ b/content/browser/download/download_manager_impl_unittest.cc @@ -1010,7 +1010,7 @@ TEST_F(DownloadManagerTest, MAYBE_DownloadFileErrorTest) { // This file stream will be used, until the first rename occurs. net::FileStream* stream = new net::FileStream(NULL); - ASSERT_EQ(0, stream->OpenSync( + ASSERT_EQ(0, stream->Open( path, base::PLATFORM_FILE_OPEN_ALWAYS | base::PLATFORM_FILE_WRITE)); diff --git a/content/browser/download/drag_download_util.cc b/content/browser/download/drag_download_util.cc index 5f3f194..ed781bb 100644 --- a/content/browser/download/drag_download_util.cc +++ b/content/browser/download/drag_download_util.cc @@ -80,7 +80,7 @@ FileStream* CreateFileStreamForDrop(FilePath* file_path) { // Explicitly (and redundantly check) for file -- despite the fact that our // open won't overwrite -- just to avoid log spew. if (!file_util::PathExists(new_file_path) && - file_stream->OpenSync(new_file_path, base::PLATFORM_FILE_CREATE | + file_stream->Open(new_file_path, base::PLATFORM_FILE_CREATE | base::PLATFORM_FILE_WRITE) == net::OK) { *file_path = new_file_path; return file_stream.release(); |