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

Unified Diff: net/disk_cache/backend_impl.cc

Issue 6005015: Revert 70618 - First pass at adding http/backend cache events to the NetLog. ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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
« no previous file with comments | « net/disk_cache/backend_impl.h ('k') | net/disk_cache/backend_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/backend_impl.cc
===================================================================
--- net/disk_cache/backend_impl.cc (revision 70618)
+++ net/disk_cache/backend_impl.cc (working copy)
@@ -194,12 +194,11 @@
public:
CacheCreator(const FilePath& path, bool force, int max_bytes,
net::CacheType type, uint32 flags,
- base::MessageLoopProxy* thread, net::NetLog* net_log,
- disk_cache::Backend** backend,
+ base::MessageLoopProxy* thread, disk_cache::Backend** backend,
net::CompletionCallback* callback)
: path_(path), force_(force), retry_(false), max_bytes_(max_bytes),
type_(type), flags_(flags), thread_(thread), backend_(backend),
- callback_(callback), cache_(NULL), net_log_(net_log),
+ callback_(callback), cache_(NULL),
ALLOW_THIS_IN_INITIALIZER_LIST(
my_callback_(this, &CacheCreator::OnIOComplete)) {
}
@@ -224,14 +223,13 @@
disk_cache::Backend** backend_;
net::CompletionCallback* callback_;
disk_cache::BackendImpl* cache_;
- net::NetLog* net_log_;
net::CompletionCallbackImpl<CacheCreator> my_callback_;
DISALLOW_COPY_AND_ASSIGN(CacheCreator);
};
int CacheCreator::Run() {
- cache_ = new disk_cache::BackendImpl(path_, thread_, net_log_);
+ cache_ = new disk_cache::BackendImpl(path_, thread_);
cache_->SetMaxSize(max_bytes_);
cache_->SetType(type_);
cache_->SetFlags(flags_);
@@ -297,8 +295,7 @@
int CreateCacheBackend(net::CacheType type, const FilePath& path, int max_bytes,
bool force, base::MessageLoopProxy* thread,
- net::NetLog* net_log, Backend** backend,
- CompletionCallback* callback) {
+ Backend** backend, CompletionCallback* callback) {
DCHECK(callback);
if (type == net::MEMORY_CACHE) {
*backend = MemBackendImpl::CreateBackend(max_bytes);
@@ -307,7 +304,7 @@
DCHECK(thread);
return BackendImpl::CreateBackend(path, force, max_bytes, type, kNone, thread,
- net_log, backend, callback);
+ backend, callback);
}
// Returns the preferred maximum number of bytes for the cache given the
@@ -354,12 +351,11 @@
int BackendImpl::CreateBackend(const FilePath& full_path, bool force,
int max_bytes, net::CacheType type,
uint32 flags, base::MessageLoopProxy* thread,
- net::NetLog* net_log, Backend** backend,
+ Backend** backend,
CompletionCallback* callback) {
DCHECK(callback);
CacheCreator* creator = new CacheCreator(full_path, force, max_bytes, type,
- flags, thread, net_log, backend,
- callback);
+ flags, thread, backend, callback);
// This object will self-destroy when finished.
return creator->Run();
}
@@ -370,8 +366,7 @@
}
BackendImpl::BackendImpl(const FilePath& path,
- base::MessageLoopProxy* cache_thread,
- net::NetLog* net_log)
+ base::MessageLoopProxy* cache_thread)
: ALLOW_THIS_IN_INITIALIZER_LIST(background_queue_(this, cache_thread)),
path_(path),
block_files_(path),
@@ -388,7 +383,6 @@
new_eviction_(false),
first_timer_(true),
throttle_requests_(false),
- net_log_(net_log),
done_(true, false),
ALLOW_THIS_IN_INITIALIZER_LIST(factory_(this)),
ALLOW_THIS_IN_INITIALIZER_LIST(ptr_factory_(this)) {
@@ -396,8 +390,7 @@
BackendImpl::BackendImpl(const FilePath& path,
uint32 mask,
- base::MessageLoopProxy* cache_thread,
- net::NetLog* net_log)
+ base::MessageLoopProxy* cache_thread)
: ALLOW_THIS_IN_INITIALIZER_LIST(background_queue_(this, cache_thread)),
path_(path),
block_files_(path),
@@ -414,7 +407,6 @@
new_eviction_(false),
first_timer_(true),
throttle_requests_(false),
- net_log_(net_log),
done_(true, false),
ALLOW_THIS_IN_INITIALIZER_LIST(factory_(this)),
ALLOW_THIS_IN_INITIALIZER_LIST(ptr_factory_(this)) {
@@ -856,8 +848,6 @@
return NULL;
}
- cache_entry->BeginLogging(net_log_, true);
-
// We are not failing the operation; let's add this to the map.
open_entries_[entry_address.value()] = cache_entry;
@@ -1547,7 +1537,6 @@
open_entries_[address.value()] = cache_entry;
}
- cache_entry->BeginLogging(net_log_, false);
cache_entry.swap(entry);
return 0;
}
« no previous file with comments | « net/disk_cache/backend_impl.h ('k') | net/disk_cache/backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698