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

Side by Side Diff: net/disk_cache/blockfile/file_win.cc

Issue 1954543002: Remove handler from MessagePumpForIO::IOContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_observers
Patch Set: CR thestig #17 Created 4 years, 7 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
« no previous file with comments | « net/base/file_stream_context_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/disk_cache/blockfile/file.h" 5 #include "net/disk_cache/blockfile/file.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 56
57 if (data->callback_) 57 if (data->callback_)
58 data->callback_->OnFileIOComplete(static_cast<int>(actual_bytes)); 58 data->callback_->OnFileIOComplete(static_cast<int>(actual_bytes));
59 59
60 delete data; 60 delete data;
61 } 61 }
62 62
63 MyOverlapped::MyOverlapped(disk_cache::File* file, size_t offset, 63 MyOverlapped::MyOverlapped(disk_cache::File* file, size_t offset,
64 disk_cache::FileIOCallback* callback) { 64 disk_cache::FileIOCallback* callback) {
65 memset(this, 0, sizeof(*this));
66 context_.handler = g_completion_handler.Pointer();
67 context_.overlapped.Offset = static_cast<DWORD>(offset); 65 context_.overlapped.Offset = static_cast<DWORD>(offset);
68 file_ = file; 66 file_ = file;
69 callback_ = callback; 67 callback_ = callback;
70 } 68 }
71 69
72 } // namespace 70 } // namespace
73 71
74 namespace disk_cache { 72 namespace disk_cache {
75 73
76 File::File(base::File file) 74 File::File(base::File file)
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 base::MessageLoopForIO::IOHandler* handler = g_completion_handler.Pointer(); 247 base::MessageLoopForIO::IOHandler* handler = g_completion_handler.Pointer();
250 base::MessageLoopForIO::current()->WaitForIOCompletion(100, handler); 248 base::MessageLoopForIO::current()->WaitForIOCompletion(100, handler);
251 } 249 }
252 } 250 }
253 251
254 // Static. 252 // Static.
255 void File::DropPendingIO() { 253 void File::DropPendingIO() {
256 } 254 }
257 255
258 } // namespace disk_cache 256 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/base/file_stream_context_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698