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

Unified Diff: net/disk_cache/entry_impl.h

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 side-by-side diff with in-line comments
Download patch
Index: net/disk_cache/entry_impl.h
===================================================================
--- net/disk_cache/entry_impl.h (revision 126788)
+++ net/disk_cache/entry_impl.h (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -15,6 +15,7 @@
namespace disk_cache {
class BackendImpl;
+class InFlightBackendIO;
class SparseControl;
// This class implements the Entry interface. An object of this
@@ -121,6 +122,10 @@
void IncrementIoCount();
void DecrementIoCount();
+ // This entry is being returned to the user. It is always called from the
+ // primary thread (not the dedicated cache thread).
+ void OnEntryCreated(BackendImpl* backend);
+
// Set the access times for this entry. This method provides support for
// the upgrade tool.
void SetTimes(base::Time last_used, base::Time last_modified);
@@ -254,7 +259,8 @@
CacheEntryBlock entry_; // Key related information for this entry.
CacheRankingsBlock node_; // Rankings related information for this entry.
- BackendImpl* backend_; // Back pointer to the cache.
+ base::WeakPtr<BackendImpl> backend_; // Back pointer to the cache.
+ base::WeakPtr<InFlightBackendIO> background_queue_; // In-progress queue.
scoped_ptr<UserBuffer> user_buffers_[kNumStreams]; // Stores user data.
// Files to store external user data and key.
scoped_refptr<File> files_[kNumStreams + 1];

Powered by Google App Engine
This is Rietveld 408576698