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

Side by Side Diff: net/disk_cache/backend_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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | net/disk_cache/backend_impl.cc » ('j') | net/disk_cache/backend_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // See net/disk_cache/disk_cache.h for the public interface of the cache. 5 // See net/disk_cache/disk_cache.h for the public interface of the cache.
6 6
7 #ifndef NET_DISK_CACHE_BACKEND_IMPL_H_ 7 #ifndef NET_DISK_CACHE_BACKEND_IMPL_H_
8 #define NET_DISK_CACHE_BACKEND_IMPL_H_ 8 #define NET_DISK_CACHE_BACKEND_IMPL_H_
9 #pragma once 9 #pragma once
10 10
11 #include "base/file_path.h" 11 #include "base/file_path.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 // Sets the cache type for this backend. 94 // Sets the cache type for this backend.
95 void SetType(net::CacheType type); 95 void SetType(net::CacheType type);
96 96
97 // Returns the full name for an external storage file. 97 // Returns the full name for an external storage file.
98 FilePath GetFileName(Addr address) const; 98 FilePath GetFileName(Addr address) const;
99 99
100 // Returns the actual file used to store a given (non-external) address. 100 // Returns the actual file used to store a given (non-external) address.
101 MappedFile* File(Addr address); 101 MappedFile* File(Addr address);
102 102
103 InFlightBackendIO* background_queue() { 103 // Returns a weak pointer to the background queue.
104 return &background_queue_; 104 base::WeakPtr<InFlightBackendIO> GetBackgroundQueue();
105 }
106 105
107 // Creates an external storage file. 106 // Creates an external storage file.
108 bool CreateExternalFile(Addr* address); 107 bool CreateExternalFile(Addr* address);
109 108
110 // Creates a new storage block of size block_count. 109 // Creates a new storage block of size block_count.
111 bool CreateBlock(FileType block_type, int block_count, 110 bool CreateBlock(FileType block_type, int block_count,
112 Addr* block_address); 111 Addr* block_address);
113 112
114 // Deletes a given storage block. deep set to true can be used to zero-fill 113 // Deletes a given storage block. deep set to true can be used to zero-fill
115 // the related storage in addition of releasing the related block. 114 // the related storage in addition of releasing the related block.
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 392
394 DISALLOW_COPY_AND_ASSIGN(BackendImpl); 393 DISALLOW_COPY_AND_ASSIGN(BackendImpl);
395 }; 394 };
396 395
397 // Returns the preferred max cache size given the available disk space. 396 // Returns the preferred max cache size given the available disk space.
398 NET_EXPORT_PRIVATE int PreferedCacheSize(int64 available); 397 NET_EXPORT_PRIVATE int PreferedCacheSize(int64 available);
399 398
400 } // namespace disk_cache 399 } // namespace disk_cache
401 400
402 #endif // NET_DISK_CACHE_BACKEND_IMPL_H_ 401 #endif // NET_DISK_CACHE_BACKEND_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | net/disk_cache/backend_impl.cc » ('j') | net/disk_cache/backend_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698