diff options
author | darin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-07 19:23:12 +0000 |
---|---|---|
committer | darin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-07 19:23:12 +0000 |
commit | 20da260f9f6bab65c196d6ad51320b313926aeba (patch) | |
tree | 4a55612e84572a0ba33a07fd7ffad868d61890f3 /net/url_request/url_request_file_job.cc | |
parent | 940c97722d9a3209542036ccfb844bec6a1314a8 (diff) | |
download | chromium_src-20da260f9f6bab65c196d6ad51320b313926aeba.zip chromium_src-20da260f9f6bab65c196d6ad51320b313926aeba.tar.gz chromium_src-20da260f9f6bab65c196d6ad51320b313926aeba.tar.bz2 |
Rollback r517 to retry with ObjectWatcher. This change did not appear to be
the cause of the page cycler regression.
TBR=jar
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@526 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request/url_request_file_job.cc')
-rw-r--r-- | net/url_request/url_request_file_job.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/net/url_request/url_request_file_job.cc b/net/url_request/url_request_file_job.cc index a738b3a..9f828d4 100644 --- a/net/url_request/url_request_file_job.cc +++ b/net/url_request/url_request_file_job.cc @@ -40,7 +40,7 @@ // attempts to read more from the file to fill its buffer. If reading from the // file does not complete synchronously, then the URLRequestFileJob waits for a // signal from the OS that the overlapped read has completed. It does so by -// leveraging the MessageLoop::WatchObject API. +// leveraging the ObjectWatcher API. #include <process.h> #include <windows.h> @@ -57,6 +57,7 @@ #include "net/url_request/url_request.h" #include "net/url_request/url_request_file_dir_job.h" +// TODO(darin): The file job should not depend on WinInet!! using net::WinInetUtil; namespace { @@ -165,7 +166,7 @@ void URLRequestFileJob::Start() { void URLRequestFileJob::Kill() { // If we are killed while waiting for an overlapped result... if (is_waiting_) { - MessageLoop::current()->WatchObject(overlapped_.hEvent, NULL); + watcher_.StopWatching(); is_waiting_ = false; Release(); } @@ -203,7 +204,7 @@ bool URLRequestFileJob::ReadRawData(char* dest, int dest_size, DWORD err = GetLastError(); if (err == ERROR_IO_PENDING) { // OK, wait for the object to become signaled - MessageLoop::current()->WatchObject(overlapped_.hEvent, this); + watcher_.StartWatching(overlapped_.hEvent, this); is_waiting_ = true; SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0)); AddRef(); @@ -284,9 +285,7 @@ void URLRequestFileJob::OnObjectSignaled(HANDLE object) { DCHECK(overlapped_.hEvent == object); DCHECK(is_waiting_); - // We'll resume watching this handle if need be when we do - // another IO. - MessageLoop::current()->WatchObject(object, NULL); + // We'll resume watching this handle if need be when we do another IO. is_waiting_ = false; DWORD bytes_read = 0; |