Skip to content

Commit

Permalink
Remove the tracing cache backend.
Browse files Browse the repository at this point in the history
While working on issue 410276, in particular in
https://codereview.chromium.org/542733002/ , I had to update the
tracing cache backend. Why? Does anyone use it?

Let's remove it instead.

R=pasko@chromium.org,clamy@chromium.org
BUG=None

Review URL: https://codereview.chromium.org/544923002

Cr-Commit-Position: refs/heads/master@{#293505}
  • Loading branch information
gavinp authored and Commit bot committed Sep 5, 2014
1 parent 827189d commit b8af58e
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 456 deletions.
43 changes: 0 additions & 43 deletions net/disk_cache/backend_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "net/disk_cache/simple/simple_entry_format.h"
#include "net/disk_cache/simple/simple_test_util.h"
#include "net/disk_cache/simple/simple_util.h"
#include "net/disk_cache/tracing/tracing_cache_backend.h"
#include "testing/gtest/include/gtest/gtest.h"

#if defined(OS_WIN)
Expand Down Expand Up @@ -127,7 +126,6 @@ class DiskCacheBackendTest : public DiskCacheTestWithCache {
void BackendDisable2();
void BackendDisable3();
void BackendDisable4();
void TracingBackendBasics();
};

int DiskCacheBackendTest::GeneratePendingIO(net::TestCompletionCallback* cb) {
Expand Down Expand Up @@ -3150,40 +3148,6 @@ TEST_F(DiskCacheBackendTest, ShaderCacheUpdateRankForExternalCacheHit) {
entry->Close();
}

void DiskCacheBackendTest::TracingBackendBasics() {
InitCache();
cache_.reset(new disk_cache::TracingCacheBackend(cache_.Pass()));
cache_impl_ = NULL;
EXPECT_EQ(net::DISK_CACHE, cache_->GetCacheType());
if (!simple_cache_mode_) {
EXPECT_EQ(0, cache_->GetEntryCount());
}

net::TestCompletionCallback cb;
disk_cache::Entry* entry = NULL;
EXPECT_NE(net::OK, OpenEntry("key", &entry));
EXPECT_TRUE(NULL == entry);

ASSERT_EQ(net::OK, CreateEntry("key", &entry));
EXPECT_TRUE(NULL != entry);

disk_cache::Entry* same_entry = NULL;
ASSERT_EQ(net::OK, OpenEntry("key", &same_entry));
EXPECT_TRUE(NULL != same_entry);

if (!simple_cache_mode_) {
EXPECT_EQ(1, cache_->GetEntryCount());
}
entry->Close();
entry = NULL;
same_entry->Close();
same_entry = NULL;
}

TEST_F(DiskCacheBackendTest, TracingBackendBasics) {
TracingBackendBasics();
}

// The Simple Cache backend requires a few guarantees from the filesystem like
// atomic renaming of recently open files. Those guarantees are not provided in
// general on Windows.
Expand Down Expand Up @@ -3271,13 +3235,6 @@ TEST_F(DiskCacheBackendTest, SimpleCacheAppCacheOnlyDoomAll) {
BackendDoomAll();
}

TEST_F(DiskCacheBackendTest, SimpleCacheTracingBackendBasics) {
SetSimpleCacheMode();
TracingBackendBasics();
// TODO(pasko): implement integrity checking on the Simple Backend.
DisableIntegrityCheck();
}

TEST_F(DiskCacheBackendTest, SimpleCacheOpenMissingFile) {
SetSimpleCacheMode();
InitCache();
Expand Down
4 changes: 0 additions & 4 deletions net/disk_cache/cache_creator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
#include "net/disk_cache/memory/mem_backend_impl.h"
#include "net/disk_cache/simple/simple_backend_impl.h"

#ifdef USE_TRACING_CACHE_BACKEND
#include "net/disk_cache/tracing_cache_backend.h"
#endif

namespace {

// Builds an instance of the backend depending on platform, type, experiments
Expand Down
317 changes: 0 additions & 317 deletions net/disk_cache/tracing/tracing_cache_backend.cc

This file was deleted.

Loading

0 comments on commit b8af58e

Please sign in to comment.