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

Unified Diff: net/http/http_cache.h

Issue 4067002: First pass at adding http/backend cache to NetLog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Add back mysteriously missing files Created 10 years 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/http/http_cache.h
===================================================================
--- net/http/http_cache.h (revision 68857)
+++ net/http/http_cache.h (working copy)
@@ -86,7 +86,8 @@
// notification arrives.
// The implementation must not access the factory object after invoking the
// |callback| because the object can be deleted from within the callback.
- virtual int CreateBackend(disk_cache::Backend** backend,
+ virtual int CreateBackend(NetLog* net_log,
+ disk_cache::Backend** backend,
CompletionCallback* callback) = 0;
};
@@ -104,7 +105,8 @@
static BackendFactory* InMemory(int max_bytes);
// BackendFactory implementation.
- virtual int CreateBackend(disk_cache::Backend** backend,
+ virtual int CreateBackend(NetLog* net_log,
+ disk_cache::Backend** backend,
CompletionCallback* callback);
private:
@@ -138,7 +140,8 @@
// by the HttpCache and will be destroyed using |delete| when the HttpCache is
// destroyed.
HttpCache(HttpTransactionFactory* network_layer,
- BackendFactory* backend_factory);
+ BackendFactory* backend_factory,
+ NetLog* net_log);
HttpTransactionFactory* network_layer() { return network_layer_.get(); }
@@ -213,7 +216,7 @@
bool will_process_pending_queue;
bool doomed;
- explicit ActiveEntry(disk_cache::Entry*);
+ explicit ActiveEntry(disk_cache::Entry* entry);
~ActiveEntry();
};
@@ -293,6 +296,11 @@
// one (in this case, the entry is no longer valid).
int AddTransactionToEntry(ActiveEntry* entry, Transaction* trans);
+ // Same as AddTransactionToEntry, except it does create a NetLog event for
+ // queuing the event. Used by OnProcessPendingQueue to prevent redundant
+ // logging.
+ int AddTransactionToEntryInternal(ActiveEntry* entry, Transaction* trans);
+
// Called when the transaction has finished working with this entry. |cancel|
// is true if the operation was cancelled by the caller instead of running
// to completion.
@@ -342,6 +350,8 @@
// Variables ----------------------------------------------------------------
+ NetLog* net_log_;
+
// Used when lazily constructing the disk_cache_.
scoped_ptr<BackendFactory> backend_factory_;
bool building_backend_;

Powered by Google App Engine
This is Rietveld 408576698