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

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

Issue 137483004: Merge 243495 "Disk Cache: Use the old WorkerPool for Async IO on..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1750/src/
Patch Set: Created 6 years, 11 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
« no previous file with comments | « no previous file | net/disk_cache/backend_unittest.cc » ('j') | 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/backend_impl.h" 5 #include "net/disk_cache/backend_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 298
299 if (init_) { 299 if (init_) {
300 StoreStats(); 300 StoreStats();
301 if (data_) 301 if (data_)
302 data_->header.crash = 0; 302 data_->header.crash = 0;
303 303
304 if (user_flags_ & kNoRandom) { 304 if (user_flags_ & kNoRandom) {
305 // This is a net_unittest, verify that we are not 'leaking' entries. 305 // This is a net_unittest, verify that we are not 'leaking' entries.
306 File::WaitForPendingIO(&num_pending_io_); 306 File::WaitForPendingIO(&num_pending_io_);
307 DCHECK(!num_refs_); 307 DCHECK(!num_refs_);
308 } else {
309 File::DropPendingIO();
308 } 310 }
309 } 311 }
310 block_files_.CloseFiles(); 312 block_files_.CloseFiles();
311 FlushIndex(); 313 FlushIndex();
312 index_ = NULL; 314 index_ = NULL;
313 ptr_factory_.InvalidateWeakPtrs(); 315 ptr_factory_.InvalidateWeakPtrs();
314 done_.Signal(); 316 done_.Signal();
315 } 317 }
316 318
317 // ------------------------------------------------------------------------ 319 // ------------------------------------------------------------------------
(...skipping 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after
2077 if (total_memory > kMaxBuffersSize || total_memory <= 0) 2079 if (total_memory > kMaxBuffersSize || total_memory <= 0)
2078 total_memory = kMaxBuffersSize; 2080 total_memory = kMaxBuffersSize;
2079 2081
2080 done = true; 2082 done = true;
2081 } 2083 }
2082 2084
2083 return static_cast<int>(total_memory); 2085 return static_cast<int>(total_memory);
2084 } 2086 }
2085 2087
2086 } // namespace disk_cache 2088 } // namespace disk_cache
OLDNEW
« no previous file with comments | « no previous file | net/disk_cache/backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698