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

Side by Side Diff: net/base/file_stream_context_win.cc

Issue 1158923005: Use the exact-width integer types defined in <stdint.h> rather than (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak comments. Exclude mime_sniffer*. Rebase. Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/base/file_stream_context.h" 5 #include "net/base/file_stream_context.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 LOG(WARNING) << "WriteFile failed: " << error.os_error; 109 LOG(WARNING) << "WriteFile failed: " << error.os_error;
110 return static_cast<int>(error.result); 110 return static_cast<int>(error.result);
111 } 111 }
112 112
113 IOCompletionIsPending(callback, buf); 113 IOCompletionIsPending(callback, buf);
114 return ERR_IO_PENDING; 114 return ERR_IO_PENDING;
115 } 115 }
116 116
117 FileStream::Context::IOResult FileStream::Context::SeekFileImpl( 117 FileStream::Context::IOResult FileStream::Context::SeekFileImpl(
118 base::File::Whence whence, 118 base::File::Whence whence,
119 int64 offset) { 119 int64_t offset) {
120 LARGE_INTEGER result; 120 LARGE_INTEGER result;
121 result.QuadPart = file_.Seek(whence, offset); 121 result.QuadPart = file_.Seek(whence, offset);
122 if (result.QuadPart >= 0) { 122 if (result.QuadPart >= 0) {
123 SetOffset(&io_context_.overlapped, result); 123 SetOffset(&io_context_.overlapped, result);
124 return IOResult(result.QuadPart, 0); 124 return IOResult(result.QuadPart, 0);
125 } 125 }
126 126
127 return IOResult::FromOSError(GetLastError()); 127 return IOResult::FromOSError(GetLastError());
128 } 128 }
129 129
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 IOResult error = IOResult::FromOSError(os_error); 242 IOResult error = IOResult::FromOSError(os_error);
243 if (error.os_error == ERROR_IO_PENDING) { 243 if (error.os_error == ERROR_IO_PENDING) {
244 InvokeUserCallback(); 244 InvokeUserCallback();
245 } else { 245 } else {
246 OnIOCompleted(&io_context_, 0, error.os_error); 246 OnIOCompleted(&io_context_, 0, error.os_error);
247 } 247 }
248 } 248 }
249 249
250 } // namespace net 250 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698