From 3a97ca8dd9b96b599ae2d33e40df0dd2f7ea5859 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 14 Aug 2015 11:38:45 +0200 Subject: BASELINE: Update chromium to 45.0.2454.40 Change-Id: Id2121d9f11a8fc633677236c65a3e41feef589e4 Reviewed-by: Andras Becsi --- chromium/net/base/file_stream_context.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'chromium/net/base/file_stream_context.h') diff --git a/chromium/net/base/file_stream_context.h b/chromium/net/base/file_stream_context.h index 74677fe8fb9..c1846c460d3 100644 --- a/chromium/net/base/file_stream_context.h +++ b/chromium/net/base/file_stream_context.h @@ -31,6 +31,7 @@ #include "base/memory/weak_ptr.h" #include "base/message_loop/message_loop.h" #include "base/move.h" +#include "base/single_thread_task_runner.h" #include "base/task_runner.h" #include "net/base/completion_callback.h" #include "net/base/file_stream.h" @@ -74,7 +75,6 @@ class FileStream::Context { int buf_len, const CompletionCallback& callback); - const base::File& file() const { return file_; } bool async_in_progress() const { return async_in_progress_; } //////////////////////////////////////////////////////////////////////////// @@ -92,19 +92,20 @@ class FileStream::Context { void Close(const CompletionCallback& callback); - void Seek(base::File::Whence whence, - int64 offset, - const Int64CompletionCallback& callback); + // Seeks |offset| bytes from the start of the file. + void Seek(int64_t offset, const Int64CompletionCallback& callback); void Flush(const CompletionCallback& callback); + bool IsOpen() const; + private: struct IOResult { IOResult(); - IOResult(int64 result, logging::SystemErrorCode os_error); + IOResult(int64_t result, logging::SystemErrorCode os_error); static IOResult FromOSError(logging::SystemErrorCode os_error); - int64 result; + int64_t result; logging::SystemErrorCode os_error; // Set only when result < 0. }; @@ -149,7 +150,7 @@ class FileStream::Context { //////////////////////////////////////////////////////////////////////////// // Adjusts the position from where the data is read. - IOResult SeekFileImpl(base::File::Whence whence, int64 offset); + IOResult SeekFileImpl(int64_t offset); void OnFileOpened(); @@ -180,15 +181,15 @@ class FileStream::Context { // The |buf_len| parameter contains the number of bytes to be read. // The |overlapped| parameter is a pointer to the OVERLAPPED structure being // used. - // The |origin_thread_loop| is a MessageLoopProxy instance used to post tasks - // back to the originating thread. + // The |origin_thread_task_runner| is a task runner instance used to post + // tasks back to the originating thread. static void ReadAsync( FileStream::Context* context, HANDLE file, scoped_refptr buf, int buf_len, OVERLAPPED* overlapped, - scoped_refptr origin_thread_loop); + scoped_refptr origin_thread_task_runner); // This callback executes on the main calling thread. It informs the caller // about the result of the ReadFile call. -- cgit v1.2.1