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

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

Issue 23752005: Disk Cache: Replace the worker pool with a sequenced worker pool (posix). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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') | net/disk_cache/backend_unittest.cc » ('J')
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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 330
331 if (init_) { 331 if (init_) {
332 StoreStats(); 332 StoreStats();
333 if (data_) 333 if (data_)
334 data_->header.crash = 0; 334 data_->header.crash = 0;
335 335
336 if (user_flags_ & kNoRandom) { 336 if (user_flags_ & kNoRandom) {
337 // This is a net_unittest, verify that we are not 'leaking' entries. 337 // This is a net_unittest, verify that we are not 'leaking' entries.
338 File::WaitForPendingIO(&num_pending_io_); 338 File::WaitForPendingIO(&num_pending_io_);
339 DCHECK(!num_refs_); 339 DCHECK(!num_refs_);
340 } else {
341 File::DropPendingIO();
342 } 340 }
343 } 341 }
344 block_files_.CloseFiles(); 342 block_files_.CloseFiles();
345 FlushIndex(); 343 FlushIndex();
346 index_ = NULL; 344 index_ = NULL;
347 ptr_factory_.InvalidateWeakPtrs(); 345 ptr_factory_.InvalidateWeakPtrs();
348 done_.Signal(); 346 done_.Signal();
349 } 347 }
350 348
351 // ------------------------------------------------------------------------ 349 // ------------------------------------------------------------------------
(...skipping 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after
2111 if (total_memory > kMaxBuffersSize || total_memory <= 0) 2109 if (total_memory > kMaxBuffersSize || total_memory <= 0)
2112 total_memory = kMaxBuffersSize; 2110 total_memory = kMaxBuffersSize;
2113 2111
2114 done = true; 2112 done = true;
2115 } 2113 }
2116 2114
2117 return static_cast<int>(total_memory); 2115 return static_cast<int>(total_memory);
2118 } 2116 }
2119 2117
2120 } // namespace disk_cache 2118 } // namespace disk_cache
OLDNEW
« no previous file with comments | « no previous file | net/disk_cache/backend_unittest.cc » ('j') | net/disk_cache/backend_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698