summaryrefslogtreecommitdiffstats
path: root/net/base
diff options
context:
space:
mode:
authorsatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-19 00:10:32 +0000
committersatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-19 00:10:32 +0000
commitf3608f24754a25c714eaaf845a62c5ae0d63d711 (patch)
tree2f358a97dd646735dee4f39d74ac80b53bbd8d7a /net/base
parentc0e55036275c4b8bffb82439bd19a8562c870251 (diff)
downloadchromium_src-f3608f24754a25c714eaaf845a62c5ae0d63d711.zip
chromium_src-f3608f24754a25c714eaaf845a62c5ae0d63d711.tar.gz
chromium_src-f3608f24754a25c714eaaf845a62c5ae0d63d711.tar.bz2
net: Minor cleanup for FileStream implementation on Windows.
s/INVALID_HANDLE_VALUE/base::kInvalidPlatformFileValue/g Per base/platform_file.h, these are the same thing. BUG=none TEST=chrome and tests build. Review URL: http://codereview.chromium.org/9422014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122706 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r--net/base/file_stream_win.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/base/file_stream_win.cc b/net/base/file_stream_win.cc
index 8ee7cbe..e89e8c4 100644
--- a/net/base/file_stream_win.cc
+++ b/net/base/file_stream_win.cc
@@ -72,7 +72,7 @@ void OpenFile(const FilePath& path,
path.AsUTF8Unsafe())));
*file = base::CreatePlatformFile(path, open_flags, NULL, NULL);
- if (*file == INVALID_HANDLE_VALUE) {
+ if (*file == base::kInvalidPlatformFileValue) {
DWORD error = GetLastError();
LOG(WARNING) << "Failed to open file: " << error;
*result = RecordAndMapError(error,
@@ -88,7 +88,7 @@ void OpenFile(const FilePath& path,
void CloseFile(base::PlatformFile file,
const net::BoundNetLog& bound_net_log) {
bound_net_log.AddEvent(net::NetLog::TYPE_FILE_STREAM_CLOSE, NULL);
- if (file == INVALID_HANDLE_VALUE)
+ if (file == base::kInvalidPlatformFileValue)
return;
CancelIo(file);
@@ -261,17 +261,17 @@ void FileStream::CloseSync() {
// caled in this function.
bound_net_log_.AddEvent(net::NetLog::TYPE_FILE_STREAM_CLOSE, NULL);
- if (file_ != INVALID_HANDLE_VALUE)
+ if (file_ != base::kInvalidPlatformFileValue)
CancelIo(file_);
// TODO(satorux): Remove this once all async clients are migrated to use
// Close(). crbug.com/114783
async_context_.reset();
- if (file_ != INVALID_HANDLE_VALUE) {
+ if (file_ != base::kInvalidPlatformFileValue) {
if (!base::ClosePlatformFile(file_))
NOTREACHED();
- file_ = INVALID_HANDLE_VALUE;
+ file_ = base::kInvalidPlatformFileValue;
bound_net_log_.EndEvent(net::NetLog::TYPE_FILE_STREAM_OPEN, NULL);
}
@@ -333,7 +333,7 @@ int FileStream::OpenSync(const FilePath& path, int open_flags) {
}
bool FileStream::IsOpen() const {
- return file_ != INVALID_HANDLE_VALUE;
+ return file_ != base::kInvalidPlatformFileValue;
}
int64 FileStream::Seek(Whence whence, int64 offset) {
@@ -615,7 +615,7 @@ void FileStream::SetBoundNetLogSource(
}
void FileStream::OnClosed() {
- file_ = INVALID_HANDLE_VALUE;
+ file_ = base::kInvalidPlatformFileValue;
CompletionCallback temp = callback_;
callback_.Reset();