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

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

Issue 9702059: Disk cache: Remove all non essential synchronization from the cache destructor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 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/file.h" 5 #include "net/disk_cache/file.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
11 #include "net/disk_cache/disk_cache.h" 11 #include "net/disk_cache/disk_cache.h"
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 // Static. 257 // Static.
258 void File::WaitForPendingIO(int* num_pending_io) { 258 void File::WaitForPendingIO(int* num_pending_io) {
259 while (*num_pending_io) { 259 while (*num_pending_io) {
260 // Asynchronous IO operations may be in flight and the completion may end 260 // Asynchronous IO operations may be in flight and the completion may end
261 // up calling us back so let's wait for them. 261 // up calling us back so let's wait for them.
262 MessageLoopForIO::IOHandler* handler = g_completion_handler.Pointer(); 262 MessageLoopForIO::IOHandler* handler = g_completion_handler.Pointer();
263 MessageLoopForIO::current()->WaitForIOCompletion(100, handler); 263 MessageLoopForIO::current()->WaitForIOCompletion(100, handler);
264 } 264 }
265 } 265 }
266 266
267 // Static.
268 void File::DropPendingIO() {
269 // Nothing to do here.
270 }
271
267 } // namespace disk_cache 272 } // namespace disk_cache
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698