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

Unified Diff: net/base/upload_data.cc

Issue 9349005: net: Rename FileStream::Open/Close with OpenSync/CloseSync. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 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
« no previous file with comments | « net/base/mock_file_stream.cc ('k') | net/base/upload_data_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/upload_data.cc
diff --git a/net/base/upload_data.cc b/net/base/upload_data.cc
index 908fb2dacf61ffb6c9c5aa88c0102b2bb41dcd63..bffe13b2d9e731d39f8427f298989237743bd83a 100644
--- a/net/base/upload_data.cc
+++ b/net/base/upload_data.cc
@@ -31,7 +31,7 @@ UploadData::Element::~Element() {
if (file_stream_) {
// Temporarily allow until fix: http://crbug.com/72001.
base::ThreadRestrictions::ScopedAllowIO allow_io;
- file_stream_->Close();
+ file_stream_->CloseSync();
delete file_stream_;
}
}
@@ -107,8 +107,9 @@ FileStream* UploadData::Element::NewFileStreamForReading() {
base::ThreadRestrictions::ScopedAllowIO allow_io;
scoped_ptr<FileStream> file(new FileStream(NULL));
- int64 rv = file->Open(file_path_,
- base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ);
+ int64 rv = file->OpenSync(
+ file_path_,
+ base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ);
if (rv != OK) {
// If the file can't be opened, we'll just upload an empty file.
DLOG(WARNING) << "Failed to open \"" << file_path_.value()
« no previous file with comments | « net/base/mock_file_stream.cc ('k') | net/base/upload_data_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698