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

Unified Diff: net/disk_cache/tracing/tracing_cache_backend.h

Issue 544923002: Remove the tracing cache backend. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@preventry
Patch Set: Created 6 years, 3 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/cache_creator.cc ('k') | net/disk_cache/tracing/tracing_cache_backend.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/tracing/tracing_cache_backend.h
diff --git a/net/disk_cache/tracing/tracing_cache_backend.h b/net/disk_cache/tracing/tracing_cache_backend.h
deleted file mode 100644
index b8d18696f54019330c925b2cf2f9728d95165ad0..0000000000000000000000000000000000000000
--- a/net/disk_cache/tracing/tracing_cache_backend.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright (c) 2013 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.
-
-#ifndef NET_DISK_CACHE_TRACING_TRACING_CACHE_BACKEND_H_
-#define NET_DISK_CACHE_TRACING_TRACING_CACHE_BACKEND_H_
-
-#include <map>
-
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "net/disk_cache/blockfile/stats.h"
-#include "net/disk_cache/disk_cache.h"
-
-namespace disk_cache {
-
-class EntryProxy;
-
-// The TracingCacheBackend implements the Cache Backend interface. It intercepts
-// all backend operations from the IO thread and records the time from the start
-// of the operation until the result is delivered.
-class NET_EXPORT TracingCacheBackend : public Backend,
- public base::SupportsWeakPtr<TracingCacheBackend> {
- public:
- explicit TracingCacheBackend(scoped_ptr<Backend> backend);
-
- virtual net::CacheType GetCacheType() const OVERRIDE;
- virtual int32 GetEntryCount() const OVERRIDE;
- virtual int OpenEntry(const std::string& key, Entry** entry,
- const CompletionCallback& callback) OVERRIDE;
- virtual int CreateEntry(const std::string& key, Entry** entry,
- const CompletionCallback& callback) OVERRIDE;
- virtual int DoomEntry(const std::string& key,
- const CompletionCallback& callback) OVERRIDE;
- virtual int DoomAllEntries(const CompletionCallback& callback) OVERRIDE;
- virtual int DoomEntriesBetween(base::Time initial_time,
- base::Time end_time,
- const CompletionCallback& callback) OVERRIDE;
- virtual int DoomEntriesSince(base::Time initial_time,
- const CompletionCallback& callback) OVERRIDE;
- virtual int OpenNextEntry(void** iter, Entry** next_entry,
- const CompletionCallback& callback) OVERRIDE;
- virtual void EndEnumeration(void** iter) OVERRIDE;
- virtual void GetStats(StatsItems* stats) OVERRIDE;
- virtual void OnExternalCacheHit(const std::string& key) OVERRIDE;
-
- private:
- friend class EntryProxy;
- enum Operation {
- OP_OPEN,
- OP_CREATE,
- OP_DOOM_ENTRY,
- OP_READ,
- OP_WRITE
- };
-
- virtual ~TracingCacheBackend();
-
- EntryProxy* FindOrCreateEntryProxy(Entry* entry);
-
- void OnDeleteEntry(Entry* e);
-
- void RecordEvent(base::TimeTicks start_time, Operation op, std::string key,
- Entry* entry, int result);
-
- void BackendOpComplete(base::TimeTicks start_time, Operation op,
- std::string key, Entry** entry,
- const CompletionCallback& callback, int result);
-
- net::CompletionCallback BindCompletion(Operation op,
- base::TimeTicks start_time,
- const std::string& key, Entry **entry,
- const net::CompletionCallback& cb);
-
- scoped_ptr<Backend> backend_;
- typedef std::map<Entry*, EntryProxy*> EntryToProxyMap;
- EntryToProxyMap open_entries_;
-
- DISALLOW_COPY_AND_ASSIGN(TracingCacheBackend);
-};
-
-} // namespace disk_cache
-
-#endif // NET_DISK_CACHE_TRACING_TRACING_CACHE_BACKEND_H_
« no previous file with comments | « net/disk_cache/cache_creator.cc ('k') | net/disk_cache/tracing/tracing_cache_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698