| Index: net/disk_cache/backend_impl.h
|
| ===================================================================
|
| --- net/disk_cache/backend_impl.h (revision 126788)
|
| +++ net/disk_cache/backend_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.
|
|
|
| @@ -56,10 +56,10 @@
|
| int max_bytes, net::CacheType type,
|
| uint32 flags, base::MessageLoopProxy* thread,
|
| net::NetLog* net_log, Backend** backend,
|
| - const net::CompletionCallback& callback);
|
| + const CompletionCallback& callback);
|
|
|
| // Performs general initialization for this current instance of the cache.
|
| - int Init(const net::CompletionCallback& callback);
|
| + int Init(const CompletionCallback& callback);
|
|
|
| // Performs the actual initialization and final cleanup on destruction.
|
| int SyncInit();
|
| @@ -67,7 +67,7 @@
|
|
|
| // Same behavior as OpenNextEntry but walks the list from back to front.
|
| int OpenPrevEntry(void** iter, Entry** prev_entry,
|
| - const net::CompletionCallback& callback);
|
| + const CompletionCallback& callback);
|
|
|
| // Synchronous implementation of the asynchronous interface.
|
| int SyncOpenEntry(const std::string& key, Entry** entry);
|
| @@ -100,9 +100,8 @@
|
| // Returns the actual file used to store a given (non-external) address.
|
| MappedFile* File(Addr address);
|
|
|
| - InFlightBackendIO* background_queue() {
|
| - return &background_queue_;
|
| - }
|
| + // Returns a weak pointer to the background queue.
|
| + base::WeakPtr<InFlightBackendIO> GetBackgroundQueue();
|
|
|
| // Creates an external storage file.
|
| bool CreateExternalFile(Addr* address);
|
| @@ -238,12 +237,12 @@
|
| void ClearRefCountForTest();
|
|
|
| // Sends a dummy operation through the operation queue, for unit tests.
|
| - int FlushQueueForTest(const net::CompletionCallback& callback);
|
| + int FlushQueueForTest(const CompletionCallback& callback);
|
|
|
| // Runs the provided task on the cache thread. The task will be automatically
|
| // deleted after it runs.
|
| int RunTaskForTest(const base::Closure& task,
|
| - const net::CompletionCallback& callback);
|
| + const CompletionCallback& callback);
|
|
|
| // Trims an entry (all if |empty| is true) from the list of deleted
|
| // entries. This method should be called directly on the cache thread.
|
| @@ -260,21 +259,19 @@
|
| // Backend implementation.
|
| virtual int32 GetEntryCount() const OVERRIDE;
|
| virtual int OpenEntry(const std::string& key, Entry** entry,
|
| - const net::CompletionCallback& callback) OVERRIDE;
|
| + const CompletionCallback& callback) OVERRIDE;
|
| virtual int CreateEntry(const std::string& key, Entry** entry,
|
| - const net::CompletionCallback& callback) OVERRIDE;
|
| + const CompletionCallback& callback) OVERRIDE;
|
| virtual int DoomEntry(const std::string& key,
|
| - const net::CompletionCallback& callback) OVERRIDE;
|
| - virtual int DoomAllEntries(const net::CompletionCallback& callback) OVERRIDE;
|
| - virtual int DoomEntriesBetween(
|
| - const base::Time initial_time,
|
| - const base::Time end_time,
|
| - const net::CompletionCallback& callback) OVERRIDE;
|
| - virtual int DoomEntriesSince(
|
| - const base::Time initial_time,
|
| - const net::CompletionCallback& callback) OVERRIDE;
|
| + const CompletionCallback& callback) OVERRIDE;
|
| + virtual int DoomAllEntries(const CompletionCallback& callback) OVERRIDE;
|
| + virtual int DoomEntriesBetween(const base::Time initial_time,
|
| + const base::Time end_time,
|
| + const CompletionCallback& callback) OVERRIDE;
|
| + virtual int DoomEntriesSince(const base::Time initial_time,
|
| + const CompletionCallback& callback) OVERRIDE;
|
| virtual int OpenNextEntry(void** iter, Entry** next_entry,
|
| - const net::CompletionCallback& callback) OVERRIDE;
|
| + const CompletionCallback& callback) OVERRIDE;
|
| virtual void EndEnumeration(void** iter) OVERRIDE;
|
| virtual void GetStats(StatsItems* stats) OVERRIDE;
|
| virtual void OnExternalCacheHit(const std::string& key) OVERRIDE;
|
|
|