summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgavinp@chromium.org <gavinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-26 20:23:43 +0000
committergavinp@chromium.org <gavinp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-26 20:23:43 +0000
commitdb1156813ca4e0c82a36bb1ded160f00f579b1c6 (patch)
tree38e289dd86f34958a27bbcf0afc32bbfe60232e2
parent61e3f8e0af467ebcffe7f9f7d5a8d5565ea29067 (diff)
downloadchromium_src-db1156813ca4e0c82a36bb1ded160f00f579b1c6.zip
chromium_src-db1156813ca4e0c82a36bb1ded160f00f579b1c6.tar.gz
chromium_src-db1156813ca4e0c82a36bb1ded160f00f579b1c6.tar.bz2
Reorganize net/disk_cache into backend specific directories.
We want to unlink the blockfile cache on Android, and it seems that we'll want more platforms with more varieties of backend in the future. So let's move the backend into its own subdirectory as we start to untangle the dependencies from tests/etc... into their respective backends. This initial checkin isn't perfect; in particular the tests have a lot of v2 specific dependencies still. R=rvargas@chromium.org, cbentzel, rvargas BUG=331062 Review URL: https://codereview.chromium.org/121643003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253581 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/net/http_pipelining_compatibility_client.cc2
-rw-r--r--net/disk_cache/backend_unittest.cc14
-rw-r--r--net/disk_cache/blockfile/addr.cc (renamed from net/disk_cache/addr.cc)2
-rw-r--r--net/disk_cache/blockfile/addr.h (renamed from net/disk_cache/addr.h)8
-rw-r--r--net/disk_cache/blockfile/addr_unittest.cc (renamed from net/disk_cache/addr_unittest.cc)2
-rw-r--r--net/disk_cache/blockfile/backend_impl.cc (renamed from net/disk_cache/backend_impl.cc)14
-rw-r--r--net/disk_cache/blockfile/backend_impl.h (renamed from net/disk_cache/backend_impl.h)20
-rw-r--r--net/disk_cache/blockfile/backend_impl_v3.cc (renamed from net/disk_cache/v3/backend_impl_v3.cc)18
-rw-r--r--net/disk_cache/blockfile/backend_impl_v3.h (renamed from net/disk_cache/v3/backend_impl_v3.h)20
-rw-r--r--net/disk_cache/blockfile/backend_worker_v3.cc (renamed from net/disk_cache/v3/backend_worker.cc)12
-rw-r--r--net/disk_cache/blockfile/backend_worker_v3.h (renamed from net/disk_cache/v3/backend_worker.h)20
-rw-r--r--net/disk_cache/blockfile/bitmap.cc (renamed from net/disk_cache/bitmap.cc)2
-rw-r--r--net/disk_cache/blockfile/bitmap.h (renamed from net/disk_cache/bitmap.h)6
-rw-r--r--net/disk_cache/blockfile/bitmap_unittest.cc (renamed from net/disk_cache/bitmap_unittest.cc)2
-rw-r--r--net/disk_cache/blockfile/block_bitmaps_v3.cc (renamed from net/disk_cache/v3/block_bitmaps.cc)6
-rw-r--r--net/disk_cache/blockfile/block_bitmaps_v3.h (renamed from net/disk_cache/v3/block_bitmaps.h)10
-rw-r--r--net/disk_cache/blockfile/block_bitmaps_v3_unittest.cc (renamed from net/disk_cache/v3/block_bitmaps_unittest.cc)8
-rw-r--r--net/disk_cache/blockfile/block_files.cc (renamed from net/disk_cache/block_files.cc)8
-rw-r--r--net/disk_cache/blockfile/block_files.h (renamed from net/disk_cache/block_files.h)12
-rw-r--r--net/disk_cache/blockfile/block_files_unittest.cc (renamed from net/disk_cache/block_files_unittest.cc)4
-rw-r--r--net/disk_cache/blockfile/disk_cache_perftest.cc (renamed from net/disk_cache/disk_cache_perftest.cc)4
-rw-r--r--net/disk_cache/blockfile/disk_format.cc (renamed from net/disk_cache/disk_format.cc)2
-rw-r--r--net/disk_cache/blockfile/disk_format.h (renamed from net/disk_cache/disk_format.h)8
-rw-r--r--net/disk_cache/blockfile/disk_format_base.h (renamed from net/disk_cache/disk_format_base.h)6
-rw-r--r--net/disk_cache/blockfile/disk_format_v3.h (renamed from net/disk_cache/v3/disk_format_v3.h)8
-rw-r--r--net/disk_cache/blockfile/entry_impl.cc (renamed from net/disk_cache/entry_impl.cc)12
-rw-r--r--net/disk_cache/blockfile/entry_impl.h (renamed from net/disk_cache/entry_impl.h)12
-rw-r--r--net/disk_cache/blockfile/entry_impl_v3.cc (renamed from net/disk_cache/v3/entry_impl_v3.cc)12
-rw-r--r--net/disk_cache/blockfile/entry_impl_v3.h (renamed from net/disk_cache/v3/entry_impl_v3.h)10
-rw-r--r--net/disk_cache/blockfile/errors.h (renamed from net/disk_cache/errors.h)6
-rw-r--r--net/disk_cache/blockfile/eviction.cc (renamed from net/disk_cache/eviction.cc)14
-rw-r--r--net/disk_cache/blockfile/eviction.h (renamed from net/disk_cache/eviction.h)8
-rw-r--r--net/disk_cache/blockfile/eviction_v3.cc (renamed from net/disk_cache/v3/eviction_v3.cc)16
-rw-r--r--net/disk_cache/blockfile/eviction_v3.h (renamed from net/disk_cache/v3/eviction_v3.h)10
-rw-r--r--net/disk_cache/blockfile/experiments.h (renamed from net/disk_cache/experiments.h)6
-rw-r--r--net/disk_cache/blockfile/file.cc (renamed from net/disk_cache/file.cc)2
-rw-r--r--net/disk_cache/blockfile/file.h (renamed from net/disk_cache/file.h)6
-rw-r--r--net/disk_cache/blockfile/file_block.h (renamed from net/disk_cache/file_block.h)6
-rw-r--r--net/disk_cache/blockfile/file_ios.cc (renamed from net/disk_cache/file_ios.cc)2
-rw-r--r--net/disk_cache/blockfile/file_lock.cc (renamed from net/disk_cache/file_lock.cc)2
-rw-r--r--net/disk_cache/blockfile/file_lock.h (renamed from net/disk_cache/file_lock.h)8
-rw-r--r--net/disk_cache/blockfile/file_posix.cc (renamed from net/disk_cache/file_posix.cc)2
-rw-r--r--net/disk_cache/blockfile/file_win.cc (renamed from net/disk_cache/file_win.cc)2
-rw-r--r--net/disk_cache/blockfile/histogram_macros.h (renamed from net/disk_cache/histogram_macros.h)6
-rw-r--r--net/disk_cache/blockfile/histogram_macros_v3.h (renamed from net/disk_cache/v3/histogram_macros.h)6
-rw-r--r--net/disk_cache/blockfile/in_flight_backend_io.cc (renamed from net/disk_cache/in_flight_backend_io.cc)8
-rw-r--r--net/disk_cache/blockfile/in_flight_backend_io.h (renamed from net/disk_cache/in_flight_backend_io.h)8
-rw-r--r--net/disk_cache/blockfile/in_flight_io.cc (renamed from net/disk_cache/in_flight_io.cc)2
-rw-r--r--net/disk_cache/blockfile/in_flight_io.h (renamed from net/disk_cache/in_flight_io.h)6
-rw-r--r--net/disk_cache/blockfile/index_table_v3.cc (renamed from net/disk_cache/v3/index_table.cc)2
-rw-r--r--net/disk_cache/blockfile/index_table_v3.h (renamed from net/disk_cache/v3/index_table.h)12
-rw-r--r--net/disk_cache/blockfile/index_table_v3_unittest.cc (renamed from net/disk_cache/v3/index_table_unittest.cc)6
-rw-r--r--net/disk_cache/blockfile/mapped_file.cc (renamed from net/disk_cache/mapped_file.cc)2
-rw-r--r--net/disk_cache/blockfile/mapped_file.h (renamed from net/disk_cache/mapped_file.h)10
-rw-r--r--net/disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc (renamed from net/disk_cache/mapped_file_avoid_mmap_posix.cc)2
-rw-r--r--net/disk_cache/blockfile/mapped_file_posix.cc (renamed from net/disk_cache/mapped_file_posix.cc)2
-rw-r--r--net/disk_cache/blockfile/mapped_file_unittest.cc (renamed from net/disk_cache/mapped_file_unittest.cc)4
-rw-r--r--net/disk_cache/blockfile/mapped_file_win.cc (renamed from net/disk_cache/mapped_file_win.cc)2
-rw-r--r--net/disk_cache/blockfile/rankings.cc (renamed from net/disk_cache/rankings.cc)14
-rw-r--r--net/disk_cache/blockfile/rankings.h (renamed from net/disk_cache/rankings.h)12
-rw-r--r--net/disk_cache/blockfile/sparse_control.cc (renamed from net/disk_cache/sparse_control.cc)8
-rw-r--r--net/disk_cache/blockfile/sparse_control.h (renamed from net/disk_cache/sparse_control.h)10
-rw-r--r--net/disk_cache/blockfile/sparse_control_v3.cc (renamed from net/disk_cache/v3/sparse_control_v3.cc)8
-rw-r--r--net/disk_cache/blockfile/sparse_control_v3.h (renamed from net/disk_cache/v3/sparse_control_v3.h)8
-rw-r--r--net/disk_cache/blockfile/stats.cc (renamed from net/disk_cache/stats.cc)2
-rw-r--r--net/disk_cache/blockfile/stats.h (renamed from net/disk_cache/stats.h)10
-rw-r--r--net/disk_cache/blockfile/stats_histogram.cc (renamed from net/disk_cache/stats_histogram.cc)4
-rw-r--r--net/disk_cache/blockfile/stats_histogram.h (renamed from net/disk_cache/stats_histogram.h)6
-rw-r--r--net/disk_cache/blockfile/storage_block-inl.h (renamed from net/disk_cache/storage_block-inl.h)10
-rw-r--r--net/disk_cache/blockfile/storage_block.h (renamed from net/disk_cache/storage_block.h)10
-rw-r--r--net/disk_cache/blockfile/storage_block_unittest.cc (renamed from net/disk_cache/storage_block_unittest.cc)6
-rw-r--r--net/disk_cache/blockfile/stress_cache.cc (renamed from net/disk_cache/stress_cache.cc)6
-rw-r--r--net/disk_cache/blockfile/stress_support.h (renamed from net/disk_cache/stress_support.h)6
-rw-r--r--net/disk_cache/blockfile/trace.cc (renamed from net/disk_cache/trace.cc)4
-rw-r--r--net/disk_cache/blockfile/trace.h (renamed from net/disk_cache/trace.h)6
-rw-r--r--net/disk_cache/cache_creator.cc4
-rw-r--r--net/disk_cache/disk_cache_test_base.cc4
-rw-r--r--net/disk_cache/disk_cache_test_util.cc4
-rw-r--r--net/disk_cache/entry_unittest.cc6
-rw-r--r--net/disk_cache/memory/mem_backend_impl.cc (renamed from net/disk_cache/mem_backend_impl.cc)4
-rw-r--r--net/disk_cache/memory/mem_backend_impl.h (renamed from net/disk_cache/mem_backend_impl.h)8
-rw-r--r--net/disk_cache/memory/mem_entry_impl.cc (renamed from net/disk_cache/mem_entry_impl.cc)4
-rw-r--r--net/disk_cache/memory/mem_entry_impl.h (renamed from net/disk_cache/mem_entry_impl.h)6
-rw-r--r--net/disk_cache/memory/mem_rankings.cc (renamed from net/disk_cache/mem_rankings.cc)4
-rw-r--r--net/disk_cache/memory/mem_rankings.h (renamed from net/disk_cache/mem_rankings.h)6
-rw-r--r--net/disk_cache/tracing/tracing_cache_backend.cc (renamed from net/disk_cache/tracing_cache_backend.cc)2
-rw-r--r--net/disk_cache/tracing/tracing_cache_backend.h (renamed from net/disk_cache/tracing_cache_backend.h)11
-rw-r--r--net/net.gyp199
-rw-r--r--net/tools/crash_cache/crash_cache.cc4
-rw-r--r--net/tools/dump_cache/cache_dumper.cc2
-rw-r--r--net/tools/dump_cache/cache_dumper.h2
-rw-r--r--net/tools/dump_cache/dump_cache.cc2
-rw-r--r--net/tools/dump_cache/dump_files.cc12
-rw-r--r--net/tools/dump_cache/upgrade_win.cc4
94 files changed, 426 insertions, 424 deletions
diff --git a/chrome/browser/net/http_pipelining_compatibility_client.cc b/chrome/browser/net/http_pipelining_compatibility_client.cc
index 4b36dab..407211b 100644
--- a/chrome/browser/net/http_pipelining_compatibility_client.cc
+++ b/chrome/browser/net/http_pipelining_compatibility_client.cc
@@ -15,7 +15,7 @@
#include "net/base/load_flags.h"
#include "net/base/network_change_notifier.h"
#include "net/base/request_priority.h"
-#include "net/disk_cache/histogram_macros.h"
+#include "net/disk_cache/blockfile/histogram_macros.h"
#include "net/http/http_network_layer.h"
#include "net/http/http_network_session.h"
#include "net/http/http_response_headers.h"
diff --git a/net/disk_cache/backend_unittest.cc b/net/disk_cache/backend_unittest.cc
index 8119f85..35fdebc 100644
--- a/net/disk_cache/backend_unittest.cc
+++ b/net/disk_cache/backend_unittest.cc
@@ -15,20 +15,20 @@
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/base/test_completion_callback.h"
-#include "net/disk_cache/backend_impl.h"
+#include "net/disk_cache/blockfile/backend_impl.h"
+#include "net/disk_cache/blockfile/entry_impl.h"
+#include "net/disk_cache/blockfile/experiments.h"
+#include "net/disk_cache/blockfile/histogram_macros.h"
+#include "net/disk_cache/blockfile/mapped_file.h"
#include "net/disk_cache/cache_util.h"
#include "net/disk_cache/disk_cache_test_base.h"
#include "net/disk_cache/disk_cache_test_util.h"
-#include "net/disk_cache/entry_impl.h"
-#include "net/disk_cache/experiments.h"
-#include "net/disk_cache/histogram_macros.h"
-#include "net/disk_cache/mapped_file.h"
-#include "net/disk_cache/mem_backend_impl.h"
+#include "net/disk_cache/memory/mem_backend_impl.h"
#include "net/disk_cache/simple/simple_backend_impl.h"
#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_cache_backend.h"
+#include "net/disk_cache/tracing/tracing_cache_backend.h"
#include "testing/gtest/include/gtest/gtest.h"
#if defined(OS_WIN)
diff --git a/net/disk_cache/addr.cc b/net/disk_cache/blockfile/addr.cc
index 8f41e6f..ab418c4 100644
--- a/net/disk_cache/addr.cc
+++ b/net/disk_cache/blockfile/addr.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/addr.h"
+#include "net/disk_cache/blockfile/addr.h"
#include "base/logging.h"
diff --git a/net/disk_cache/addr.h b/net/disk_cache/blockfile/addr.h
index 664e462..99d2c93 100644
--- a/net/disk_cache/addr.h
+++ b/net/disk_cache/blockfile/addr.h
@@ -5,11 +5,11 @@
// This is an internal class that handles the address of a cache record.
// See net/disk_cache/disk_cache.h for the public interface of the cache.
-#ifndef NET_DISK_CACHE_ADDR_H_
-#define NET_DISK_CACHE_ADDR_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_ADDR_H_
+#define NET_DISK_CACHE_BLOCKFILE_ADDR_H_
#include "net/base/net_export.h"
-#include "net/disk_cache/disk_format_base.h"
+#include "net/disk_cache/blockfile/disk_format_base.h"
namespace disk_cache {
@@ -185,4 +185,4 @@ class NET_EXPORT_PRIVATE Addr {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_ADDR_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_ADDR_H_
diff --git a/net/disk_cache/addr_unittest.cc b/net/disk_cache/blockfile/addr_unittest.cc
index a6da03c..eaed659 100644
--- a/net/disk_cache/addr_unittest.cc
+++ b/net/disk_cache/blockfile/addr_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/addr.h"
+#include "net/disk_cache/blockfile/addr.h"
#include "net/disk_cache/disk_cache_test_base.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/blockfile/backend_impl.cc
index c934b87..85c4e36 100644
--- a/net/disk_cache/backend_impl.cc
+++ b/net/disk_cache/blockfile/backend_impl.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/backend_impl.h"
+#include "net/disk_cache/blockfile/backend_impl.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -21,13 +21,13 @@
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "net/base/net_errors.h"
+#include "net/disk_cache/blockfile/disk_format.h"
+#include "net/disk_cache/blockfile/entry_impl.h"
+#include "net/disk_cache/blockfile/errors.h"
+#include "net/disk_cache/blockfile/experiments.h"
+#include "net/disk_cache/blockfile/file.h"
+#include "net/disk_cache/blockfile/histogram_macros.h"
#include "net/disk_cache/cache_util.h"
-#include "net/disk_cache/disk_format.h"
-#include "net/disk_cache/entry_impl.h"
-#include "net/disk_cache/errors.h"
-#include "net/disk_cache/experiments.h"
-#include "net/disk_cache/file.h"
-#include "net/disk_cache/histogram_macros.h"
// Provide a BackendImpl object to macros from histogram_macros.h.
#define CACHE_UMA_BACKEND_IMPL_OBJ this
diff --git a/net/disk_cache/backend_impl.h b/net/disk_cache/blockfile/backend_impl.h
index 43e990f..3345258 100644
--- a/net/disk_cache/backend_impl.h
+++ b/net/disk_cache/blockfile/backend_impl.h
@@ -4,20 +4,20 @@
// See net/disk_cache/disk_cache.h for the public interface of the cache.
-#ifndef NET_DISK_CACHE_BACKEND_IMPL_H_
-#define NET_DISK_CACHE_BACKEND_IMPL_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_H_
+#define NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_H_
#include "base/containers/hash_tables.h"
#include "base/files/file_path.h"
#include "base/timer/timer.h"
-#include "net/disk_cache/block_files.h"
+#include "net/disk_cache/blockfile/block_files.h"
+#include "net/disk_cache/blockfile/eviction.h"
+#include "net/disk_cache/blockfile/in_flight_backend_io.h"
+#include "net/disk_cache/blockfile/rankings.h"
+#include "net/disk_cache/blockfile/stats.h"
+#include "net/disk_cache/blockfile/stress_support.h"
+#include "net/disk_cache/blockfile/trace.h"
#include "net/disk_cache/disk_cache.h"
-#include "net/disk_cache/eviction.h"
-#include "net/disk_cache/in_flight_backend_io.h"
-#include "net/disk_cache/rankings.h"
-#include "net/disk_cache/stats.h"
-#include "net/disk_cache/stress_support.h"
-#include "net/disk_cache/trace.h"
namespace net {
class NetLog;
@@ -397,4 +397,4 @@ class NET_EXPORT_PRIVATE BackendImpl : public Backend {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_BACKEND_IMPL_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_H_
diff --git a/net/disk_cache/v3/backend_impl_v3.cc b/net/disk_cache/blockfile/backend_impl_v3.cc
index 67dc861..ce0b8d0 100644
--- a/net/disk_cache/v3/backend_impl_v3.cc
+++ b/net/disk_cache/blockfile/backend_impl_v3.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/v3/backend_impl_v3.h"
+#include "net/disk_cache/blockfile/backend_impl_v3.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -21,15 +21,15 @@
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "net/base/net_errors.h"
+#include "net/disk_cache/blockfile/disk_format_v3.h"
+#include "net/disk_cache/blockfile/entry_impl_v3.h"
+#include "net/disk_cache/blockfile/errors.h"
+#include "net/disk_cache/blockfile/experiments.h"
+#include "net/disk_cache/blockfile/file.h"
+#include "net/disk_cache/blockfile/histogram_macros_v3.h"
+#include "net/disk_cache/blockfile/index_table_v3.h"
+#include "net/disk_cache/blockfile/storage_block-inl.h"
#include "net/disk_cache/cache_util.h"
-#include "net/disk_cache/errors.h"
-#include "net/disk_cache/experiments.h"
-#include "net/disk_cache/file.h"
-#include "net/disk_cache/storage_block-inl.h"
-#include "net/disk_cache/v3/disk_format_v3.h"
-#include "net/disk_cache/v3/entry_impl_v3.h"
-#include "net/disk_cache/v3/histogram_macros.h"
-#include "net/disk_cache/v3/index_table.h"
// Provide a BackendImpl object to macros from histogram_macros.h.
#define CACHE_UMA_BACKEND_IMPL_OBJ this
diff --git a/net/disk_cache/v3/backend_impl_v3.h b/net/disk_cache/blockfile/backend_impl_v3.h
index 9c14db5d..adb926c 100644
--- a/net/disk_cache/v3/backend_impl_v3.h
+++ b/net/disk_cache/blockfile/backend_impl_v3.h
@@ -4,20 +4,20 @@
// See net/disk_cache/disk_cache.h for the public interface of the cache.
-#ifndef NET_DISK_CACHE_V3_BACKEND_IMPL_V3_H_
-#define NET_DISK_CACHE_V3_BACKEND_IMPL_V3_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_V3_H_
+#define NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_V3_H_
#include "base/containers/hash_tables.h"
#include "base/files/file_path.h"
#include "base/timer/timer.h"
-#include "net/disk_cache/block_files.h"
+#include "net/disk_cache/blockfile/block_bitmaps_v3.h"
+#include "net/disk_cache/blockfile/block_files.h"
+#include "net/disk_cache/blockfile/eviction_v3.h"
+#include "net/disk_cache/blockfile/index_table_v3.h"
+#include "net/disk_cache/blockfile/stats.h"
+#include "net/disk_cache/blockfile/stress_support.h"
+#include "net/disk_cache/blockfile/trace.h"
#include "net/disk_cache/disk_cache.h"
-#include "net/disk_cache/stats.h"
-#include "net/disk_cache/stress_support.h"
-#include "net/disk_cache/trace.h"
-#include "net/disk_cache/v3/block_bitmaps.h"
-#include "net/disk_cache/v3/eviction_v3.h"
-#include "net/disk_cache/v3/index_table.h"
namespace net {
class NetLog;
@@ -280,4 +280,4 @@ class NET_EXPORT_PRIVATE BackendImplV3 : public Backend {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_V3_BACKEND_IMPL_V3_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_V3_H_
diff --git a/net/disk_cache/v3/backend_worker.cc b/net/disk_cache/blockfile/backend_worker_v3.cc
index a4acefb..d02eee5 100644
--- a/net/disk_cache/v3/backend_worker.cc
+++ b/net/disk_cache/blockfile/backend_worker_v3.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/backend_impl.h"
+#include "net/disk_cache/blockfile/backend_worker_v3.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -21,12 +21,12 @@
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "net/base/net_errors.h"
+#include "net/disk_cache/blockfile/entry_impl.h"
+#include "net/disk_cache/blockfile/errors.h"
+#include "net/disk_cache/blockfile/experiments.h"
+#include "net/disk_cache/blockfile/file.h"
+#include "net/disk_cache/blockfile/histogram_macros.h"
#include "net/disk_cache/cache_util.h"
-#include "net/disk_cache/entry_impl.h"
-#include "net/disk_cache/errors.h"
-#include "net/disk_cache/experiments.h"
-#include "net/disk_cache/file.h"
-#include "net/disk_cache/histogram_macros.h"
// Provide a BackendImpl object to macros from histogram_macros.h.
#define CACHE_UMA_BACKEND_IMPL_OBJ this
diff --git a/net/disk_cache/v3/backend_worker.h b/net/disk_cache/blockfile/backend_worker_v3.h
index 42fd4b2..a184d8f 100644
--- a/net/disk_cache/v3/backend_worker.h
+++ b/net/disk_cache/blockfile/backend_worker_v3.h
@@ -4,20 +4,20 @@
// See net/disk_cache/disk_cache.h for the public interface of the cache.
-#ifndef NET_DISK_CACHE_BACKEND_IMPL_H_
-#define NET_DISK_CACHE_BACKEND_IMPL_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_BACKEND_WORKER_V3_H_
+#define NET_DISK_CACHE_BLOCKFILE_BACKEND_WORKER_V3_H_
#include "base/containers/hash_tables.h"
#include "base/files/file_path.h"
#include "base/timer/timer.h"
-#include "net/disk_cache/block_files.h"
+#include "net/disk_cache/blockfile/block_files.h"
+#include "net/disk_cache/blockfile/eviction.h"
+#include "net/disk_cache/blockfile/in_flight_backend_io.h"
+#include "net/disk_cache/blockfile/rankings.h"
+#include "net/disk_cache/blockfile/stats.h"
+#include "net/disk_cache/blockfile/stress_support.h"
+#include "net/disk_cache/blockfile/trace.h"
#include "net/disk_cache/disk_cache.h"
-#include "net/disk_cache/eviction.h"
-#include "net/disk_cache/in_flight_backend_io.h"
-#include "net/disk_cache/rankings.h"
-#include "net/disk_cache/stats.h"
-#include "net/disk_cache/stress_support.h"
-#include "net/disk_cache/trace.h"
namespace disk_cache {
@@ -57,4 +57,4 @@ class NET_EXPORT_PRIVATE BackendImpl : public Backend {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_BACKEND_IMPL_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_BACKEND_WORKER_V3_H_
diff --git a/net/disk_cache/bitmap.cc b/net/disk_cache/blockfile/bitmap.cc
index 6d469df..cfbf846 100644
--- a/net/disk_cache/bitmap.cc
+++ b/net/disk_cache/blockfile/bitmap.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/bitmap.h"
+#include "net/disk_cache/blockfile/bitmap.h"
#include <algorithm>
diff --git a/net/disk_cache/bitmap.h b/net/disk_cache/blockfile/bitmap.h
index 81c434c..dc05157 100644
--- a/net/disk_cache/bitmap.h
+++ b/net/disk_cache/blockfile/bitmap.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_DISK_CACHE_BITMAP_H_
-#define NET_DISK_CACHE_BITMAP_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_BITMAP_H_
+#define NET_DISK_CACHE_BLOCKFILE_BITMAP_H_
#include "base/basictypes.h"
#include "net/base/net_export.h"
@@ -133,4 +133,4 @@ class NET_EXPORT_PRIVATE Bitmap {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_BITMAP_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_BITMAP_H_
diff --git a/net/disk_cache/bitmap_unittest.cc b/net/disk_cache/blockfile/bitmap_unittest.cc
index d80ea74..a0748bf 100644
--- a/net/disk_cache/bitmap_unittest.cc
+++ b/net/disk_cache/blockfile/bitmap_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/bitmap.h"
+#include "net/disk_cache/blockfile/bitmap.h"
#include "testing/gtest/include/gtest/gtest.h"
TEST(BitmapTest, OverAllocate) {
diff --git a/net/disk_cache/v3/block_bitmaps.cc b/net/disk_cache/blockfile/block_bitmaps_v3.cc
index b68ecdd..984ce49 100644
--- a/net/disk_cache/v3/block_bitmaps.cc
+++ b/net/disk_cache/blockfile/block_bitmaps_v3.cc
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/v3/block_bitmaps.h"
+#include "net/disk_cache/blockfile/block_bitmaps_v3.h"
#include "base/metrics/histogram.h"
#include "base/time/time.h"
-#include "net/disk_cache/disk_format_base.h"
-#include "net/disk_cache/trace.h"
+#include "net/disk_cache/blockfile/disk_format_base.h"
+#include "net/disk_cache/blockfile/trace.h"
using base::TimeTicks;
diff --git a/net/disk_cache/v3/block_bitmaps.h b/net/disk_cache/blockfile/block_bitmaps_v3.h
index 111d57b..40eefb1 100644
--- a/net/disk_cache/v3/block_bitmaps.h
+++ b/net/disk_cache/blockfile/block_bitmaps_v3.h
@@ -4,13 +4,13 @@
// See net/disk_cache/disk_cache.h for the public interface.
-#ifndef NET_DISK_CACHE_V3_BLOCK_BITMAPS_H_
-#define NET_DISK_CACHE_V3_BLOCK_BITMAPS_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_BLOCK_BITMAPS_V3_H_
+#define NET_DISK_CACHE_BLOCKFILE_BLOCK_BITMAPS_V3_H_
#include "base/files/file_path.h"
#include "net/base/net_export.h"
-#include "net/disk_cache/addr.h"
-#include "net/disk_cache/block_files.h"
+#include "net/disk_cache/blockfile/addr.h"
+#include "net/disk_cache/blockfile/block_files.h"
namespace disk_cache {
@@ -62,4 +62,4 @@ class NET_EXPORT_PRIVATE BlockBitmaps {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_V3_BLOCK_BITMAPS_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_BLOCK_BITMAPS_V3_H_
diff --git a/net/disk_cache/v3/block_bitmaps_unittest.cc b/net/disk_cache/blockfile/block_bitmaps_v3_unittest.cc
index 981bdec..bf22d882 100644
--- a/net/disk_cache/v3/block_bitmaps_unittest.cc
+++ b/net/disk_cache/blockfile/block_bitmaps_v3_unittest.cc
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/addr.h"
-#include "net/disk_cache/block_files.h"
-#include "net/disk_cache/disk_format_base.h"
-#include "net/disk_cache/v3/block_bitmaps.h"
+#include "net/disk_cache/blockfile/addr.h"
+#include "net/disk_cache/blockfile/block_bitmaps_v3.h"
+#include "net/disk_cache/blockfile/block_files.h"
+#include "net/disk_cache/blockfile/disk_format_base.h"
#include "testing/gtest/include/gtest/gtest.h"
// Tests that we add and remove blocks correctly.
diff --git a/net/disk_cache/block_files.cc b/net/disk_cache/blockfile/block_files.cc
index 982d685..3f4bbf5 100644
--- a/net/disk_cache/block_files.cc
+++ b/net/disk_cache/blockfile/block_files.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/block_files.h"
+#include "net/disk_cache/blockfile/block_files.h"
#include "base/atomicops.h"
#include "base/files/file_path.h"
@@ -11,10 +11,10 @@
#include "base/strings/stringprintf.h"
#include "base/threading/thread_checker.h"
#include "base/time/time.h"
+#include "net/disk_cache/blockfile/file_lock.h"
+#include "net/disk_cache/blockfile/stress_support.h"
+#include "net/disk_cache/blockfile/trace.h"
#include "net/disk_cache/cache_util.h"
-#include "net/disk_cache/file_lock.h"
-#include "net/disk_cache/stress_support.h"
-#include "net/disk_cache/trace.h"
using base::TimeTicks;
diff --git a/net/disk_cache/block_files.h b/net/disk_cache/blockfile/block_files.h
index f8d5483..f84c314 100644
--- a/net/disk_cache/block_files.h
+++ b/net/disk_cache/blockfile/block_files.h
@@ -4,8 +4,8 @@
// See net/disk_cache/disk_cache.h for the public interface.
-#ifndef NET_DISK_CACHE_BLOCK_FILES_H_
-#define NET_DISK_CACHE_BLOCK_FILES_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_BLOCK_FILES_H_
+#define NET_DISK_CACHE_BLOCKFILE_BLOCK_FILES_H_
#include <vector>
@@ -13,9 +13,9 @@
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
#include "net/base/net_export.h"
-#include "net/disk_cache/addr.h"
-#include "net/disk_cache/disk_format_base.h"
-#include "net/disk_cache/mapped_file.h"
+#include "net/disk_cache/blockfile/addr.h"
+#include "net/disk_cache/blockfile/disk_format_base.h"
+#include "net/disk_cache/blockfile/mapped_file.h"
namespace base {
class ThreadChecker;
@@ -166,4 +166,4 @@ class NET_EXPORT_PRIVATE BlockFiles {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_BLOCK_FILES_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_BLOCK_FILES_H_
diff --git a/net/disk_cache/block_files_unittest.cc b/net/disk_cache/blockfile/block_files_unittest.cc
index 4a095c9..8e2995d 100644
--- a/net/disk_cache/block_files_unittest.cc
+++ b/net/disk_cache/blockfile/block_files_unittest.cc
@@ -4,7 +4,7 @@
#include "base/file_util.h"
#include "base/files/file_enumerator.h"
-#include "net/disk_cache/block_files.h"
+#include "net/disk_cache/blockfile/block_files.h"
#include "net/disk_cache/disk_cache.h"
#include "net/disk_cache/disk_cache_test_base.h"
#include "net/disk_cache/disk_cache_test_util.h"
@@ -25,7 +25,7 @@ int NumberOfFiles(const base::FilePath& path) {
return count;
}
-} // namespace;
+} // namespace
namespace disk_cache {
diff --git a/net/disk_cache/disk_cache_perftest.cc b/net/disk_cache/blockfile/disk_cache_perftest.cc
index 6adc4bc..5087001 100644
--- a/net/disk_cache/disk_cache_perftest.cc
+++ b/net/disk_cache/blockfile/disk_cache_perftest.cc
@@ -17,8 +17,8 @@
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/base/test_completion_callback.h"
-#include "net/disk_cache/backend_impl.h"
-#include "net/disk_cache/block_files.h"
+#include "net/disk_cache/blockfile/backend_impl.h"
+#include "net/disk_cache/blockfile/block_files.h"
#include "net/disk_cache/disk_cache.h"
#include "net/disk_cache/disk_cache_test_base.h"
#include "net/disk_cache/disk_cache_test_util.h"
diff --git a/net/disk_cache/disk_format.cc b/net/disk_cache/blockfile/disk_format.cc
index 5b08954..4d398c2 100644
--- a/net/disk_cache/disk_format.cc
+++ b/net/disk_cache/blockfile/disk_format.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/disk_format.h"
+#include "net/disk_cache/blockfile/disk_format.h"
namespace disk_cache {
diff --git a/net/disk_cache/disk_format.h b/net/disk_cache/blockfile/disk_format.h
index 5d7597a..95ac58b 100644
--- a/net/disk_cache/disk_format.h
+++ b/net/disk_cache/blockfile/disk_format.h
@@ -42,12 +42,12 @@
// being currently used, it means that the entry was not properly closed on a
// previous run, so it is discarded.
-#ifndef NET_DISK_CACHE_DISK_FORMAT_H_
-#define NET_DISK_CACHE_DISK_FORMAT_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_DISK_FORMAT_H_
+#define NET_DISK_CACHE_BLOCKFILE_DISK_FORMAT_H_
#include "base/basictypes.h"
#include "net/base/net_export.h"
-#include "net/disk_cache/disk_format_base.h"
+#include "net/disk_cache/blockfile/disk_format_base.h"
namespace disk_cache {
@@ -150,4 +150,4 @@ COMPILE_ASSERT(sizeof(RankingsNode) == 36, bad_RankingsNode);
} // namespace disk_cache
-#endif // NET_DISK_CACHE_DISK_FORMAT_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_DISK_FORMAT_H_
diff --git a/net/disk_cache/disk_format_base.h b/net/disk_cache/blockfile/disk_format_base.h
index 419f41b..9f4c16e 100644
--- a/net/disk_cache/disk_format_base.h
+++ b/net/disk_cache/blockfile/disk_format_base.h
@@ -17,8 +17,8 @@
// chain of files is, any given block can be located directly by its address,
// which contains the file number and starting block inside the file.
-#ifndef NET_DISK_CACHE_DISK_FORMAT_BASE_H_
-#define NET_DISK_CACHE_DISK_FORMAT_BASE_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_DISK_FORMAT_BASE_H_
+#define NET_DISK_CACHE_BLOCKFILE_DISK_FORMAT_BASE_H_
#include "base/basictypes.h"
#include "net/base/net_export.h"
@@ -129,4 +129,4 @@ COMPILE_ASSERT(sizeof(SparseData) == sizeof(SparseHeader) + kNumSparseBits / 8,
} // namespace disk_cache
-#endif // NET_DISK_CACHE_DISK_FORMAT_BASE_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_DISK_FORMAT_BASE_H_
diff --git a/net/disk_cache/v3/disk_format_v3.h b/net/disk_cache/blockfile/disk_format_v3.h
index 7777c783..f5811cc 100644
--- a/net/disk_cache/v3/disk_format_v3.h
+++ b/net/disk_cache/blockfile/disk_format_v3.h
@@ -42,11 +42,11 @@
// them, if files are to be moved accross machines, little endian storage is
// assumed.
-#ifndef NET_DISK_CACHE_V3_DISK_FORMAT_V3_H_
-#define NET_DISK_CACHE_V3_DISK_FORMAT_V3_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_DISK_FORMAT_V3_H_
+#define NET_DISK_CACHE_BLOCKFILE_DISK_FORMAT_V3_H_
#include "base/basictypes.h"
-#include "net/disk_cache/disk_format_base.h"
+#include "net/disk_cache/blockfile/disk_format_base.h"
namespace disk_cache {
@@ -243,4 +243,4 @@ COMPILE_ASSERT(sizeof(ShortEntryRecord) == 48, bad_ShortEntryRecord);
} // namespace disk_cache
-#endif // NET_DISK_CACHE_V3_DISK_FORMAT_V3_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_DISK_FORMAT_V3_H_
diff --git a/net/disk_cache/entry_impl.cc b/net/disk_cache/blockfile/entry_impl.cc
index d6796d7..2f39e58 100644
--- a/net/disk_cache/entry_impl.cc
+++ b/net/disk_cache/blockfile/entry_impl.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/entry_impl.h"
+#include "net/disk_cache/blockfile/entry_impl.h"
#include "base/hash.h"
#include "base/message_loop/message_loop.h"
@@ -10,13 +10,13 @@
#include "base/strings/string_util.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
-#include "net/disk_cache/backend_impl.h"
-#include "net/disk_cache/bitmap.h"
+#include "net/disk_cache/blockfile/backend_impl.h"
+#include "net/disk_cache/blockfile/bitmap.h"
+#include "net/disk_cache/blockfile/disk_format.h"
+#include "net/disk_cache/blockfile/histogram_macros.h"
+#include "net/disk_cache/blockfile/sparse_control.h"
#include "net/disk_cache/cache_util.h"
-#include "net/disk_cache/disk_format.h"
-#include "net/disk_cache/histogram_macros.h"
#include "net/disk_cache/net_log_parameters.h"
-#include "net/disk_cache/sparse_control.h"
// Provide a BackendImpl object to macros from histogram_macros.h.
#define CACHE_UMA_BACKEND_IMPL_OBJ backend_
diff --git a/net/disk_cache/entry_impl.h b/net/disk_cache/blockfile/entry_impl.h
index 13d077c..c0b332b7 100644
--- a/net/disk_cache/entry_impl.h
+++ b/net/disk_cache/blockfile/entry_impl.h
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_DISK_CACHE_ENTRY_IMPL_H_
-#define NET_DISK_CACHE_ENTRY_IMPL_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_ENTRY_IMPL_H_
+#define NET_DISK_CACHE_BLOCKFILE_ENTRY_IMPL_H_
#include "base/memory/scoped_ptr.h"
#include "net/base/net_log.h"
+#include "net/disk_cache/blockfile/disk_format.h"
+#include "net/disk_cache/blockfile/storage_block-inl.h"
+#include "net/disk_cache/blockfile/storage_block.h"
#include "net/disk_cache/disk_cache.h"
-#include "net/disk_cache/disk_format.h"
-#include "net/disk_cache/storage_block.h"
-#include "net/disk_cache/storage_block-inl.h"
namespace disk_cache {
@@ -275,4 +275,4 @@ class NET_EXPORT_PRIVATE EntryImpl
} // namespace disk_cache
-#endif // NET_DISK_CACHE_ENTRY_IMPL_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_ENTRY_IMPL_H_
diff --git a/net/disk_cache/v3/entry_impl_v3.cc b/net/disk_cache/blockfile/entry_impl_v3.cc
index 432a6a7..fb80b0d 100644
--- a/net/disk_cache/v3/entry_impl_v3.cc
+++ b/net/disk_cache/blockfile/entry_impl_v3.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/v3/entry_impl_v3.h"
+#include "net/disk_cache/blockfile/entry_impl_v3.h"
#include "base/hash.h"
#include "base/message_loop/message_loop.h"
@@ -10,13 +10,13 @@
#include "base/strings/string_util.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
-#include "net/disk_cache/bitmap.h"
+#include "net/disk_cache/blockfile/backend_impl_v3.h"
+#include "net/disk_cache/blockfile/bitmap.h"
+#include "net/disk_cache/blockfile/disk_format_v3.h"
+#include "net/disk_cache/blockfile/histogram_macros_v3.h"
#include "net/disk_cache/cache_util.h"
#include "net/disk_cache/net_log_parameters.h"
-#include "net/disk_cache/v3/backend_impl_v3.h"
-#include "net/disk_cache/v3/disk_format_v3.h"
-#include "net/disk_cache/v3/histogram_macros.h"
-// #include "net/disk_cache/v3/sparse_control_v3.h"
+// #include "net/disk_cache/blockfile/sparse_control_v3.h"
// Provide a BackendImpl object to macros from histogram_macros.h.
#define CACHE_UMA_BACKEND_IMPL_OBJ backend_
diff --git a/net/disk_cache/v3/entry_impl_v3.h b/net/disk_cache/blockfile/entry_impl_v3.h
index d07d28c..6be0c71 100644
--- a/net/disk_cache/v3/entry_impl_v3.h
+++ b/net/disk_cache/blockfile/entry_impl_v3.h
@@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_DISK_CACHE_V3_ENTRY_IMPL_V3_H_
-#define NET_DISK_CACHE_V3_ENTRY_IMPL_V3_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_ENTRY_IMPL_V3_H_
+#define NET_DISK_CACHE_BLOCKFILE_ENTRY_IMPL_V3_H_
#include <string>
#include "base/memory/scoped_ptr.h"
#include "net/base/net_log.h"
+#include "net/disk_cache/blockfile/disk_format_v3.h"
+#include "net/disk_cache/blockfile/storage_block.h"
#include "net/disk_cache/disk_cache.h"
-#include "net/disk_cache/storage_block.h"
-#include "net/disk_cache/v3/disk_format_v3.h"
namespace disk_cache {
@@ -205,4 +205,4 @@ class NET_EXPORT_PRIVATE EntryImplV3
} // namespace disk_cache
-#endif // NET_DISK_CACHE_V3_ENTRY_IMPL_V3_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_ENTRY_IMPL_V3_H_
diff --git a/net/disk_cache/errors.h b/net/disk_cache/blockfile/errors.h
index 1c69d42..565eb04 100644
--- a/net/disk_cache/errors.h
+++ b/net/disk_cache/blockfile/errors.h
@@ -4,8 +4,8 @@
// Error codes reported by self tests or to UMA.
-#ifndef NET_DISK_CACHE_ERRORS_H__
-#define NET_DISK_CACHE_ERRORS_H__
+#ifndef NET_DISK_CACHE_BLOCKFILE_ERRORS_H_
+#define NET_DISK_CACHE_BLOCKFILE_ERRORS_H_
namespace disk_cache {
@@ -30,4 +30,4 @@ enum {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_ERRORS_H__
+#endif // NET_DISK_CACHE_BLOCKFILE_ERRORS_H_
diff --git a/net/disk_cache/eviction.cc b/net/disk_cache/blockfile/eviction.cc
index 3e2c779..6355bc6 100644
--- a/net/disk_cache/eviction.cc
+++ b/net/disk_cache/blockfile/eviction.cc
@@ -26,7 +26,7 @@
// size so that we have a chance to see an element again and move it to another
// list.
-#include "net/disk_cache/eviction.h"
+#include "net/disk_cache/blockfile/eviction.h"
#include "base/bind.h"
#include "base/compiler_specific.h"
@@ -34,12 +34,12 @@
#include "base/message_loop/message_loop.h"
#include "base/strings/string_util.h"
#include "base/time/time.h"
-#include "net/disk_cache/backend_impl.h"
-#include "net/disk_cache/disk_format.h"
-#include "net/disk_cache/entry_impl.h"
-#include "net/disk_cache/experiments.h"
-#include "net/disk_cache/histogram_macros.h"
-#include "net/disk_cache/trace.h"
+#include "net/disk_cache/blockfile/backend_impl.h"
+#include "net/disk_cache/blockfile/disk_format.h"
+#include "net/disk_cache/blockfile/entry_impl.h"
+#include "net/disk_cache/blockfile/experiments.h"
+#include "net/disk_cache/blockfile/histogram_macros.h"
+#include "net/disk_cache/blockfile/trace.h"
// Provide a BackendImpl object to macros from histogram_macros.h.
#define CACHE_UMA_BACKEND_IMPL_OBJ backend_
diff --git a/net/disk_cache/eviction.h b/net/disk_cache/blockfile/eviction.h
index f6224a9..e49883b 100644
--- a/net/disk_cache/eviction.h
+++ b/net/disk_cache/blockfile/eviction.h
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_DISK_CACHE_EVICTION_H_
-#define NET_DISK_CACHE_EVICTION_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_EVICTION_H_
+#define NET_DISK_CACHE_BLOCKFILE_EVICTION_H_
#include "base/basictypes.h"
#include "base/memory/weak_ptr.h"
-#include "net/disk_cache/rankings.h"
+#include "net/disk_cache/blockfile/rankings.h"
namespace disk_cache {
@@ -88,4 +88,4 @@ class Eviction {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_EVICTION_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_EVICTION_H_
diff --git a/net/disk_cache/v3/eviction_v3.cc b/net/disk_cache/blockfile/eviction_v3.cc
index fc0d37a..9d404a9 100644
--- a/net/disk_cache/v3/eviction_v3.cc
+++ b/net/disk_cache/blockfile/eviction_v3.cc
@@ -26,7 +26,7 @@
// size so that we have a chance to see an element again and move it to another
// list.
-#include "net/disk_cache/v3/eviction_v3.h"
+#include "net/disk_cache/blockfile/eviction_v3.h"
#include "base/bind.h"
#include "base/compiler_specific.h"
@@ -34,14 +34,12 @@
#include "base/message_loop/message_loop.h"
#include "base/strings/string_util.h"
#include "base/time/time.h"
-#include "net/disk_cache/experiments.h"
-#include "net/disk_cache/trace.h"
-#include "net/disk_cache/v3/backend_impl_v3.h"
-#include "net/disk_cache/v3/entry_impl_v3.h"
-#include "net/disk_cache/v3/histogram_macros.h"
-
-// Define CACHE_UMA_BACKEND_IMPL_OBJ to be a disk_cache::BackendImpl* in order
-// to use the CACHE_UMA histogram macro.
+#include "net/disk_cache/blockfile/backend_impl_v3.h"
+#include "net/disk_cache/blockfile/entry_impl_v3.h"
+#include "net/disk_cache/blockfile/experiments.h"
+#include "net/disk_cache/blockfile/histogram_macros_v3.h"
+#include "net/disk_cache/blockfile/trace.h"
+
#define CACHE_UMA_BACKEND_IMPL_OBJ backend_
using base::Time;
diff --git a/net/disk_cache/v3/eviction_v3.h b/net/disk_cache/blockfile/eviction_v3.h
index cf82a22..01fe613 100644
--- a/net/disk_cache/v3/eviction_v3.h
+++ b/net/disk_cache/blockfile/eviction_v3.h
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_DISK_CACHE_V3_EVICTION_V3_H_
-#define NET_DISK_CACHE_V3_EVICTION_V3_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_EVICTION_V3_H_
+#define NET_DISK_CACHE_BLOCKFILE_EVICTION_V3_H_
#include "base/basictypes.h"
#include "base/memory/weak_ptr.h"
-#include "net/disk_cache/v3/disk_format_v3.h"
-#include "net/disk_cache/v3/index_table.h"
+#include "net/disk_cache/blockfile/disk_format_v3.h"
+#include "net/disk_cache/blockfile/index_table_v3.h"
namespace disk_cache {
@@ -75,4 +75,4 @@ class EvictionV3 {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_V3_EVICTION_V3_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_EVICTION_V3_H_
diff --git a/net/disk_cache/experiments.h b/net/disk_cache/blockfile/experiments.h
index d7d4e58..53b6582 100644
--- a/net/disk_cache/experiments.h
+++ b/net/disk_cache/blockfile/experiments.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_DISK_CACHE_EXPERIMENTS_H_
-#define NET_DISK_CACHE_EXPERIMENTS_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_EXPERIMENTS_H_
+#define NET_DISK_CACHE_BLOCKFILE_EXPERIMENTS_H_
namespace disk_cache {
@@ -25,4 +25,4 @@ enum {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_EXPERIMENTS_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_EXPERIMENTS_H_
diff --git a/net/disk_cache/file.cc b/net/disk_cache/blockfile/file.cc
index 6b56951..17c77a4 100644
--- a/net/disk_cache/file.cc
+++ b/net/disk_cache/blockfile/file.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/file.h"
+#include "net/disk_cache/blockfile/file.h"
namespace disk_cache {
diff --git a/net/disk_cache/file.h b/net/disk_cache/blockfile/file.h
index 190f7cb..437299b 100644
--- a/net/disk_cache/file.h
+++ b/net/disk_cache/blockfile/file.h
@@ -4,8 +4,8 @@
// See net/disk_cache/disk_cache.h for the public interface of the cache.
-#ifndef NET_DISK_CACHE_FILE_H_
-#define NET_DISK_CACHE_FILE_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_FILE_H_
+#define NET_DISK_CACHE_BLOCKFILE_FILE_H_
#include "base/memory/ref_counted.h"
#include "base/platform_file.h"
@@ -97,4 +97,4 @@ class NET_EXPORT_PRIVATE File : public base::RefCounted<File> {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_FILE_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_FILE_H_
diff --git a/net/disk_cache/file_block.h b/net/disk_cache/blockfile/file_block.h
index 2570920..fdcfcd0 100644
--- a/net/disk_cache/file_block.h
+++ b/net/disk_cache/blockfile/file_block.h
@@ -4,8 +4,8 @@
// See net/disk_cache/disk_cache.h for the public interface of the cache.
-#ifndef NET_DISK_CACHE_FILE_BLOCK_H__
-#define NET_DISK_CACHE_FILE_BLOCK_H__
+#ifndef NET_DISK_CACHE_BLOCKFILE_FILE_BLOCK_H_
+#define NET_DISK_CACHE_BLOCKFILE_FILE_BLOCK_H_
namespace disk_cache {
@@ -28,4 +28,4 @@ class FileBlock {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_FILE_BLOCK_H__
+#endif // NET_DISK_CACHE_BLOCKFILE_FILE_BLOCK_H_
diff --git a/net/disk_cache/file_ios.cc b/net/disk_cache/blockfile/file_ios.cc
index 9cad155..98fec1c 100644
--- a/net/disk_cache/file_ios.cc
+++ b/net/disk_cache/blockfile/file_ios.cc
@@ -9,8 +9,8 @@
#include "base/logging.h"
#include "base/threading/worker_pool.h"
#include "net/base/net_errors.h"
+#include "net/disk_cache/blockfile/in_flight_io.h"
#include "net/disk_cache/disk_cache.h"
-#include "net/disk_cache/in_flight_io.h"
namespace {
diff --git a/net/disk_cache/file_lock.cc b/net/disk_cache/blockfile/file_lock.cc
index 3d1cfa5..edd8d08 100644
--- a/net/disk_cache/file_lock.cc
+++ b/net/disk_cache/blockfile/file_lock.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/file_lock.h"
+#include "net/disk_cache/blockfile/file_lock.h"
#include "base/atomicops.h"
diff --git a/net/disk_cache/file_lock.h b/net/disk_cache/blockfile/file_lock.h
index 7fcf75d..3486aba 100644
--- a/net/disk_cache/file_lock.h
+++ b/net/disk_cache/blockfile/file_lock.h
@@ -4,11 +4,11 @@
// See net/disk_cache/disk_cache.h for the public interface of the cache.
-#ifndef NET_DISK_CACHE_FILE_LOCK_H_
-#define NET_DISK_CACHE_FILE_LOCK_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_FILE_LOCK_H_
+#define NET_DISK_CACHE_BLOCKFILE_FILE_LOCK_H_
#include "net/base/net_export.h"
-#include "net/disk_cache/disk_format_base.h"
+#include "net/disk_cache/blockfile/disk_format_base.h"
namespace disk_cache {
@@ -42,4 +42,4 @@ class NET_EXPORT_PRIVATE FileLock {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_FILE_LOCK_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_FILE_LOCK_H_
diff --git a/net/disk_cache/file_posix.cc b/net/disk_cache/blockfile/file_posix.cc
index 37b8102..7af0f36 100644
--- a/net/disk_cache/file_posix.cc
+++ b/net/disk_cache/blockfile/file_posix.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/file.h"
+#include "net/disk_cache/blockfile/file.h"
#include "base/bind.h"
#include "base/lazy_instance.h"
diff --git a/net/disk_cache/file_win.cc b/net/disk_cache/blockfile/file_win.cc
index 1492c42..d8f5ecd 100644
--- a/net/disk_cache/file_win.cc
+++ b/net/disk_cache/blockfile/file_win.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/file.h"
+#include "net/disk_cache/blockfile/file.h"
#include "base/files/file_path.h"
#include "base/lazy_instance.h"
diff --git a/net/disk_cache/histogram_macros.h b/net/disk_cache/blockfile/histogram_macros.h
index 6af9ca1..a5d6f56 100644
--- a/net/disk_cache/histogram_macros.h
+++ b/net/disk_cache/blockfile/histogram_macros.h
@@ -8,8 +8,8 @@
// keeping track of a potentially large number of histogram objects that have to
// survive the backend object that created them.
-#ifndef NET_DISK_CACHE_HISTOGRAM_MACROS_H_
-#define NET_DISK_CACHE_HISTOGRAM_MACROS_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_HISTOGRAM_MACROS_H_
+#define NET_DISK_CACHE_BLOCKFILE_HISTOGRAM_MACROS_H_
// -----------------------------------------------------------------------------
@@ -119,4 +119,4 @@
}\
}
-#endif // NET_DISK_CACHE_HISTOGRAM_MACROS_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_HISTOGRAM_MACROS_H_
diff --git a/net/disk_cache/v3/histogram_macros.h b/net/disk_cache/blockfile/histogram_macros_v3.h
index 50d4d75..e992a7c 100644
--- a/net/disk_cache/v3/histogram_macros.h
+++ b/net/disk_cache/blockfile/histogram_macros_v3.h
@@ -8,8 +8,8 @@
// keeping track of a potentially large number of histogram objects that have to
// survive the backend object that created them.
-#ifndef NET_DISK_CACHE_V3_HISTOGRAM_MACROS_H_
-#define NET_DISK_CACHE_V3_HISTOGRAM_MACROS_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_HISTOGRAM_MACROS_V3_H_
+#define NET_DISK_CACHE_BLOCKFILE_HISTOGRAM_MACROS_V3_H_
// -----------------------------------------------------------------------------
@@ -116,4 +116,4 @@
}\
}
-#endif // NET_DISK_CACHE_V3_HISTOGRAM_MACROS_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_HISTOGRAM_MACROS_V3_H_
diff --git a/net/disk_cache/in_flight_backend_io.cc b/net/disk_cache/blockfile/in_flight_backend_io.cc
index 394cc85..c9df680 100644
--- a/net/disk_cache/in_flight_backend_io.cc
+++ b/net/disk_cache/blockfile/in_flight_backend_io.cc
@@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/in_flight_backend_io.h"
+#include "net/disk_cache/blockfile/in_flight_backend_io.h"
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "net/base/net_errors.h"
-#include "net/disk_cache/backend_impl.h"
-#include "net/disk_cache/entry_impl.h"
-#include "net/disk_cache/histogram_macros.h"
+#include "net/disk_cache/blockfile/backend_impl.h"
+#include "net/disk_cache/blockfile/entry_impl.h"
+#include "net/disk_cache/blockfile/histogram_macros.h"
// Provide a BackendImpl object to macros from histogram_macros.h.
#define CACHE_UMA_BACKEND_IMPL_OBJ backend_
diff --git a/net/disk_cache/in_flight_backend_io.h b/net/disk_cache/blockfile/in_flight_backend_io.h
index 4ff081d..70438ab8 100644
--- a/net/disk_cache/in_flight_backend_io.h
+++ b/net/disk_cache/blockfile/in_flight_backend_io.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_DISK_CACHE_IN_FLIGHT_BACKEND_IO_H_
-#define NET_DISK_CACHE_IN_FLIGHT_BACKEND_IO_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_IN_FLIGHT_BACKEND_IO_H_
+#define NET_DISK_CACHE_BLOCKFILE_IN_FLIGHT_BACKEND_IO_H_
#include <list>
#include <string>
@@ -12,7 +12,7 @@
#include "base/time/time.h"
#include "net/base/completion_callback.h"
#include "net/base/io_buffer.h"
-#include "net/disk_cache/in_flight_io.h"
+#include "net/disk_cache/blockfile/in_flight_io.h"
namespace disk_cache {
@@ -220,4 +220,4 @@ class InFlightBackendIO : public InFlightIO {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_IN_FLIGHT_BACKEND_IO_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_IN_FLIGHT_BACKEND_IO_H_
diff --git a/net/disk_cache/in_flight_io.cc b/net/disk_cache/blockfile/in_flight_io.cc
index 467814f..6e9485d 100644
--- a/net/disk_cache/in_flight_io.cc
+++ b/net/disk_cache/blockfile/in_flight_io.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/in_flight_io.h"
+#include "net/disk_cache/blockfile/in_flight_io.h"
#include "base/bind.h"
#include "base/location.h"
diff --git a/net/disk_cache/in_flight_io.h b/net/disk_cache/blockfile/in_flight_io.h
index 2a33304..78b6f4d 100644
--- a/net/disk_cache/in_flight_io.h
+++ b/net/disk_cache/blockfile/in_flight_io.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_DISK_CACHE_IN_FLIGHT_IO_H_
-#define NET_DISK_CACHE_IN_FLIGHT_IO_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_IN_FLIGHT_IO_H_
+#define NET_DISK_CACHE_BLOCKFILE_IN_FLIGHT_IO_H_
#include <set>
@@ -133,4 +133,4 @@ class InFlightIO {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_IN_FLIGHT_IO_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_IN_FLIGHT_IO_H_
diff --git a/net/disk_cache/v3/index_table.cc b/net/disk_cache/blockfile/index_table_v3.cc
index 3bbb130..999d5ac 100644
--- a/net/disk_cache/v3/index_table.cc
+++ b/net/disk_cache/blockfile/index_table_v3.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/v3/index_table.h"
+#include "net/disk_cache/blockfile/index_table_v3.h"
#include <algorithm>
#include <set>
diff --git a/net/disk_cache/v3/index_table.h b/net/disk_cache/blockfile/index_table_v3.h
index 5fb398a..598aeec 100644
--- a/net/disk_cache/v3/index_table.h
+++ b/net/disk_cache/blockfile/index_table_v3.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_DISK_CACHE_V3_INDEX_TABLE_H_
-#define NET_DISK_CACHE_V3_INDEX_TABLE_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_INDEX_TABLE_V3_H_
+#define NET_DISK_CACHE_BLOCKFILE_INDEX_TABLE_V3_H_
// The IndexTable class is in charge of handling all the details about the main
// index table of the cache. It provides methods to locate entries in the cache,
@@ -25,9 +25,9 @@
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "net/base/net_export.h"
-#include "net/disk_cache/addr.h"
-#include "net/disk_cache/bitmap.h"
-#include "net/disk_cache/v3/disk_format_v3.h"
+#include "net/disk_cache/blockfile/addr.h"
+#include "net/disk_cache/blockfile/bitmap.h"
+#include "net/disk_cache/blockfile/disk_format_v3.h"
namespace net {
class IOBuffer;
@@ -276,4 +276,4 @@ class NET_EXPORT_PRIVATE IndexTable {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_V3_INDEX_TABLE_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_INDEX_TABLE_V3_H_
diff --git a/net/disk_cache/v3/index_table_unittest.cc b/net/disk_cache/blockfile/index_table_v3_unittest.cc
index c9fb920..b7a93a2 100644
--- a/net/disk_cache/v3/index_table_unittest.cc
+++ b/net/disk_cache/blockfile/index_table_v3_unittest.cc
@@ -4,9 +4,9 @@
#include "base/basictypes.h"
#include "base/logging.h"
-#include "net/disk_cache/addr.h"
-#include "net/disk_cache/v3/disk_format_v3.h"
-#include "net/disk_cache/v3/index_table.h"
+#include "net/disk_cache/blockfile/addr.h"
+#include "net/disk_cache/blockfile/disk_format_v3.h"
+#include "net/disk_cache/blockfile/index_table_v3.h"
#include "testing/gtest/include/gtest/gtest.h"
using disk_cache::EntryCell;
diff --git a/net/disk_cache/mapped_file.cc b/net/disk_cache/blockfile/mapped_file.cc
index dd745ac..4b0f27f 100644
--- a/net/disk_cache/mapped_file.cc
+++ b/net/disk_cache/blockfile/mapped_file.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/mapped_file.h"
+#include "net/disk_cache/blockfile/mapped_file.h"
namespace disk_cache {
diff --git a/net/disk_cache/mapped_file.h b/net/disk_cache/blockfile/mapped_file.h
index ba7f4ad..8a1e40f 100644
--- a/net/disk_cache/mapped_file.h
+++ b/net/disk_cache/blockfile/mapped_file.h
@@ -4,12 +4,12 @@
// See net/disk_cache/disk_cache.h for the public interface of the cache.
-#ifndef NET_DISK_CACHE_MAPPED_FILE_H_
-#define NET_DISK_CACHE_MAPPED_FILE_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_MAPPED_FILE_H_
+#define NET_DISK_CACHE_BLOCKFILE_MAPPED_FILE_H_
#include "net/base/net_export.h"
-#include "net/disk_cache/file.h"
-#include "net/disk_cache/file_block.h"
+#include "net/disk_cache/blockfile/file.h"
+#include "net/disk_cache/blockfile/file_block.h"
namespace base {
class FilePath;
@@ -75,4 +75,4 @@ class ScopedFlush {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_MAPPED_FILE_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_MAPPED_FILE_H_
diff --git a/net/disk_cache/mapped_file_avoid_mmap_posix.cc b/net/disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc
index 940466e..3936358 100644
--- a/net/disk_cache/mapped_file_avoid_mmap_posix.cc
+++ b/net/disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/mapped_file.h"
+#include "net/disk_cache/blockfile/mapped_file.h"
#include <stdlib.h>
diff --git a/net/disk_cache/mapped_file_posix.cc b/net/disk_cache/blockfile/mapped_file_posix.cc
index 576d02a..966fc72 100644
--- a/net/disk_cache/mapped_file_posix.cc
+++ b/net/disk_cache/blockfile/mapped_file_posix.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/mapped_file.h"
+#include "net/disk_cache/blockfile/mapped_file.h"
#include <errno.h>
#include <sys/mman.h>
diff --git a/net/disk_cache/mapped_file_unittest.cc b/net/disk_cache/blockfile/mapped_file_unittest.cc
index 7afb8cc..8b3a1d0 100644
--- a/net/disk_cache/mapped_file_unittest.cc
+++ b/net/disk_cache/blockfile/mapped_file_unittest.cc
@@ -5,10 +5,10 @@
#include "base/basictypes.h"
#include "base/files/file_path.h"
#include "base/strings/string_util.h"
+#include "net/disk_cache/blockfile/file_block.h"
+#include "net/disk_cache/blockfile/mapped_file.h"
#include "net/disk_cache/disk_cache_test_base.h"
#include "net/disk_cache/disk_cache_test_util.h"
-#include "net/disk_cache/file_block.h"
-#include "net/disk_cache/mapped_file.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
diff --git a/net/disk_cache/mapped_file_win.cc b/net/disk_cache/blockfile/mapped_file_win.cc
index b795bf4..d725238 100644
--- a/net/disk_cache/mapped_file_win.cc
+++ b/net/disk_cache/blockfile/mapped_file_win.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/mapped_file.h"
+#include "net/disk_cache/blockfile/mapped_file.h"
#include "base/files/file_path.h"
#include "base/logging.h"
diff --git a/net/disk_cache/rankings.cc b/net/disk_cache/blockfile/rankings.cc
index 3ddbcf8..7c93b43 100644
--- a/net/disk_cache/rankings.cc
+++ b/net/disk_cache/blockfile/rankings.cc
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/rankings.h"
+#include "net/disk_cache/blockfile/rankings.h"
#include "base/metrics/histogram.h"
-#include "net/disk_cache/backend_impl.h"
-#include "net/disk_cache/disk_format.h"
-#include "net/disk_cache/entry_impl.h"
-#include "net/disk_cache/errors.h"
-#include "net/disk_cache/histogram_macros.h"
-#include "net/disk_cache/stress_support.h"
+#include "net/disk_cache/blockfile/backend_impl.h"
+#include "net/disk_cache/blockfile/disk_format.h"
+#include "net/disk_cache/blockfile/entry_impl.h"
+#include "net/disk_cache/blockfile/errors.h"
+#include "net/disk_cache/blockfile/histogram_macros.h"
+#include "net/disk_cache/blockfile/stress_support.h"
// Provide a BackendImpl object to macros from histogram_macros.h.
#define CACHE_UMA_BACKEND_IMPL_OBJ backend_
diff --git a/net/disk_cache/rankings.h b/net/disk_cache/blockfile/rankings.h
index cd94eaf..4224d00 100644
--- a/net/disk_cache/rankings.h
+++ b/net/disk_cache/blockfile/rankings.h
@@ -4,15 +4,15 @@
// See net/disk_cache/disk_cache.h for the public interface.
-#ifndef NET_DISK_CACHE_RANKINGS_H_
-#define NET_DISK_CACHE_RANKINGS_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_RANKINGS_H_
+#define NET_DISK_CACHE_BLOCKFILE_RANKINGS_H_
#include <list>
#include "base/memory/scoped_ptr.h"
-#include "net/disk_cache/addr.h"
-#include "net/disk_cache/mapped_file.h"
-#include "net/disk_cache/storage_block.h"
+#include "net/disk_cache/blockfile/addr.h"
+#include "net/disk_cache/blockfile/mapped_file.h"
+#include "net/disk_cache/blockfile/storage_block.h"
namespace disk_cache {
@@ -211,4 +211,4 @@ class Rankings {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_RANKINGS_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_RANKINGS_H_
diff --git a/net/disk_cache/sparse_control.cc b/net/disk_cache/blockfile/sparse_control.cc
index 1fd4fda..819d287 100644
--- a/net/disk_cache/sparse_control.cc
+++ b/net/disk_cache/blockfile/sparse_control.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/sparse_control.h"
+#include "net/disk_cache/blockfile/sparse_control.h"
#include "base/bind.h"
#include "base/format_macros.h"
@@ -13,9 +13,9 @@
#include "base/time/time.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
-#include "net/disk_cache/backend_impl.h"
-#include "net/disk_cache/entry_impl.h"
-#include "net/disk_cache/file.h"
+#include "net/disk_cache/blockfile/backend_impl.h"
+#include "net/disk_cache/blockfile/entry_impl.h"
+#include "net/disk_cache/blockfile/file.h"
#include "net/disk_cache/net_log_parameters.h"
using base::Time;
diff --git a/net/disk_cache/sparse_control.h b/net/disk_cache/blockfile/sparse_control.h
index a018e18..d3450a3 100644
--- a/net/disk_cache/sparse_control.h
+++ b/net/disk_cache/blockfile/sparse_control.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_DISK_CACHE_SPARSE_CONTROL_H_
-#define NET_DISK_CACHE_SPARSE_CONTROL_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_SPARSE_CONTROL_H_
+#define NET_DISK_CACHE_BLOCKFILE_SPARSE_CONTROL_H_
#include <string>
#include <vector>
@@ -11,8 +11,8 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "net/base/completion_callback.h"
-#include "net/disk_cache/bitmap.h"
-#include "net/disk_cache/disk_format.h"
+#include "net/disk_cache/blockfile/bitmap.h"
+#include "net/disk_cache/blockfile/disk_format.h"
namespace net {
class IOBuffer;
@@ -174,4 +174,4 @@ class SparseControl {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_SPARSE_CONTROL_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_SPARSE_CONTROL_H_
diff --git a/net/disk_cache/v3/sparse_control_v3.cc b/net/disk_cache/blockfile/sparse_control_v3.cc
index d9700ad..2fcb958 100644
--- a/net/disk_cache/v3/sparse_control_v3.cc
+++ b/net/disk_cache/blockfile/sparse_control_v3.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/sparse_control.h"
+#include "net/disk_cache/blockfile/sparse_control.h"
#include "base/bind.h"
#include "base/format_macros.h"
@@ -13,9 +13,9 @@
#include "base/time/time.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
-#include "net/disk_cache/backend_impl.h"
-#include "net/disk_cache/entry_impl.h"
-#include "net/disk_cache/file.h"
+#include "net/disk_cache/blockfile/backend_impl.h"
+#include "net/disk_cache/blockfile/entry_impl.h"
+#include "net/disk_cache/blockfile/file.h"
#include "net/disk_cache/net_log_parameters.h"
using base::Time;
diff --git a/net/disk_cache/v3/sparse_control_v3.h b/net/disk_cache/blockfile/sparse_control_v3.h
index 8455ad7..495ae19 100644
--- a/net/disk_cache/v3/sparse_control_v3.h
+++ b/net/disk_cache/blockfile/sparse_control_v3.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_DISK_CACHE_SPARSE_CONTROL_H_
-#define NET_DISK_CACHE_SPARSE_CONTROL_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_SPARSE_CONTROL_V3_H_
+#define NET_DISK_CACHE_BLOCKFILE_SPARSE_CONTROL_V3_H_
#include <string>
#include <vector>
@@ -11,7 +11,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "net/base/completion_callback.h"
-#include "net/disk_cache/bitmap.h"
+#include "net/disk_cache/blockfile/bitmap.h"
#include "net/disk_cache/disk_format.h"
namespace net {
@@ -172,4 +172,4 @@ class SparseControl {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_SPARSE_CONTROL_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_SPARSE_CONTROL_V3_H_
diff --git a/net/disk_cache/stats.cc b/net/disk_cache/blockfile/stats.cc
index b05ecc6..eaaf75a 100644
--- a/net/disk_cache/stats.cc
+++ b/net/disk_cache/blockfile/stats.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/stats.h"
+#include "net/disk_cache/blockfile/stats.h"
#include "base/format_macros.h"
#include "base/logging.h"
diff --git a/net/disk_cache/stats.h b/net/disk_cache/blockfile/stats.h
index 440334a..4a62388 100644
--- a/net/disk_cache/stats.h
+++ b/net/disk_cache/blockfile/stats.h
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_DISK_CACHE_STATS_H_
-#define NET_DISK_CACHE_STATS_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_STATS_H_
+#define NET_DISK_CACHE_BLOCKFILE_STATS_H_
#include <string>
#include <vector>
#include "base/basictypes.h"
-#include "net/disk_cache/addr.h"
-#include "net/disk_cache/stats_histogram.h"
+#include "net/disk_cache/blockfile/addr.h"
+#include "net/disk_cache/blockfile/stats_histogram.h"
namespace base {
class HistogramSamples;
@@ -102,4 +102,4 @@ class Stats {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_STATS_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_STATS_H_
diff --git a/net/disk_cache/stats_histogram.cc b/net/disk_cache/blockfile/stats_histogram.cc
index 2a67550..a95eb46f 100644
--- a/net/disk_cache/stats_histogram.cc
+++ b/net/disk_cache/blockfile/stats_histogram.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/stats_histogram.h"
+#include "net/disk_cache/blockfile/stats_histogram.h"
#include "base/debug/leak_annotations.h"
#include "base/logging.h"
@@ -10,7 +10,7 @@
#include "base/metrics/histogram_base.h"
#include "base/metrics/sample_vector.h"
#include "base/metrics/statistics_recorder.h"
-#include "net/disk_cache/stats.h"
+#include "net/disk_cache/blockfile/stats.h"
namespace disk_cache {
diff --git a/net/disk_cache/stats_histogram.h b/net/disk_cache/blockfile/stats_histogram.h
index 2e481f5..8b9c859 100644
--- a/net/disk_cache/stats_histogram.h
+++ b/net/disk_cache/blockfile/stats_histogram.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_DISK_CACHE_STATS_HISTOGRAM_H_
-#define NET_DISK_CACHE_STATS_HISTOGRAM_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_STATS_HISTOGRAM_H_
+#define NET_DISK_CACHE_BLOCKFILE_STATS_HISTOGRAM_H_
#include <string>
@@ -55,4 +55,4 @@ class StatsHistogram : public base::Histogram {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_STATS_HISTOGRAM_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_STATS_HISTOGRAM_H_
diff --git a/net/disk_cache/storage_block-inl.h b/net/disk_cache/blockfile/storage_block-inl.h
index b906186..f919c12 100644
--- a/net/disk_cache/storage_block-inl.h
+++ b/net/disk_cache/blockfile/storage_block-inl.h
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_DISK_CACHE_STORAGE_BLOCK_INL_H_
-#define NET_DISK_CACHE_STORAGE_BLOCK_INL_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_STORAGE_BLOCK_INL_H_
+#define NET_DISK_CACHE_BLOCKFILE_STORAGE_BLOCK_INL_H_
-#include "net/disk_cache/storage_block.h"
+#include "net/disk_cache/blockfile/storage_block.h"
#include "base/hash.h"
#include "base/logging.h"
-#include "net/disk_cache/trace.h"
+#include "net/disk_cache/blockfile/trace.h"
namespace disk_cache {
@@ -202,4 +202,4 @@ template<typename T> uint32 StorageBlock<T>::CalculateHash() const {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_STORAGE_BLOCK_INL_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_STORAGE_BLOCK_INL_H_
diff --git a/net/disk_cache/storage_block.h b/net/disk_cache/blockfile/storage_block.h
index f7690ed..0d51474 100644
--- a/net/disk_cache/storage_block.h
+++ b/net/disk_cache/blockfile/storage_block.h
@@ -4,11 +4,11 @@
// See net/disk_cache/disk_cache.h for the public interface.
-#ifndef NET_DISK_CACHE_STORAGE_BLOCK_H_
-#define NET_DISK_CACHE_STORAGE_BLOCK_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_STORAGE_BLOCK_H_
+#define NET_DISK_CACHE_BLOCKFILE_STORAGE_BLOCK_H_
-#include "net/disk_cache/addr.h"
-#include "net/disk_cache/mapped_file.h"
+#include "net/disk_cache/blockfile/addr.h"
+#include "net/disk_cache/blockfile/mapped_file.h"
namespace disk_cache {
@@ -94,4 +94,4 @@ class StorageBlock : public FileBlock {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_STORAGE_BLOCK_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_STORAGE_BLOCK_H_
diff --git a/net/disk_cache/storage_block_unittest.cc b/net/disk_cache/blockfile/storage_block_unittest.cc
index f91b2b9..0ed528e 100644
--- a/net/disk_cache/storage_block_unittest.cc
+++ b/net/disk_cache/blockfile/storage_block_unittest.cc
@@ -3,9 +3,9 @@
// found in the LICENSE file.
#include "base/files/file_path.h"
-#include "net/disk_cache/disk_format.h"
-#include "net/disk_cache/storage_block.h"
-#include "net/disk_cache/storage_block-inl.h"
+#include "net/disk_cache/blockfile/disk_format.h"
+#include "net/disk_cache/blockfile/storage_block-inl.h"
+#include "net/disk_cache/blockfile/storage_block.h"
#include "net/disk_cache/disk_cache_test_base.h"
#include "net/disk_cache/disk_cache_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/net/disk_cache/stress_cache.cc b/net/disk_cache/blockfile/stress_cache.cc
index 3b91c3b..66f84db 100644
--- a/net/disk_cache/stress_cache.cc
+++ b/net/disk_cache/blockfile/stress_cache.cc
@@ -36,11 +36,11 @@
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/base/test_completion_callback.h"
-#include "net/disk_cache/backend_impl.h"
+#include "net/disk_cache/blockfile/backend_impl.h"
+#include "net/disk_cache/blockfile/stress_support.h"
+#include "net/disk_cache/blockfile/trace.h"
#include "net/disk_cache/disk_cache.h"
#include "net/disk_cache/disk_cache_test_util.h"
-#include "net/disk_cache/stress_support.h"
-#include "net/disk_cache/trace.h"
#if defined(OS_WIN)
#include "base/logging_win.h"
diff --git a/net/disk_cache/stress_support.h b/net/disk_cache/blockfile/stress_support.h
index 48d7b5b7..5383c5d 100644
--- a/net/disk_cache/stress_support.h
+++ b/net/disk_cache/blockfile/stress_support.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_DISK_CACHE_STRESS_SUPPORT_H_
-#define NET_DISK_CACHE_STRESS_SUPPORT_H_
+#ifndef NET_DISK_CACHE_BLOCKFILE_STRESS_SUPPORT_H_
+#define NET_DISK_CACHE_BLOCKFILE_STRESS_SUPPORT_H_
#include "base/logging.h"
@@ -36,4 +36,4 @@ namespace disk_cache {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_STRESS_SUPPORT_H_
+#endif // NET_DISK_CACHE_BLOCKFILE_STRESS_SUPPORT_H_
diff --git a/net/disk_cache/trace.cc b/net/disk_cache/blockfile/trace.cc
index 56ebe9b..7f21e2f7 100644
--- a/net/disk_cache/trace.cc
+++ b/net/disk_cache/blockfile/trace.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/trace.h"
+#include "net/disk_cache/blockfile/trace.h"
#include <stdio.h>
#if defined(OS_WIN)
@@ -12,7 +12,7 @@
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/synchronization/lock.h"
-#include "net/disk_cache/stress_support.h"
+#include "net/disk_cache/blockfile/stress_support.h"
// Change this value to 1 to enable tracing on a release build. By default,
// tracing is enabled only on debug builds.
diff --git a/net/disk_cache/trace.h b/net/disk_cache/blockfile/trace.h
index b0bf1ad..6805e6c 100644
--- a/net/disk_cache/trace.h
+++ b/net/disk_cache/blockfile/trace.h
@@ -6,8 +6,8 @@
// keep a static circular buffer where we store the last traced events, so we
// can review the cache recent behavior should we need it.
-#ifndef NET_DISK_CACHE_TRACE_H__
-#define NET_DISK_CACHE_TRACE_H__
+#ifndef NET_DISK_CACHE_BLOCKFILE_TRACE_H_
+#define NET_DISK_CACHE_BLOCKFILE_TRACE_H_
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
@@ -38,4 +38,4 @@ NET_EXPORT_PRIVATE void Trace(const char* format, ...);
} // namespace disk_cache
-#endif // NET_DISK_CACHE_TRACE_H__
+#endif // NET_DISK_CACHE_BLOCKFILE_TRACE_H_
diff --git a/net/disk_cache/cache_creator.cc b/net/disk_cache/cache_creator.cc
index 1fee41f..102e102 100644
--- a/net/disk_cache/cache_creator.cc
+++ b/net/disk_cache/cache_creator.cc
@@ -7,10 +7,10 @@
#include "base/strings/stringprintf.h"
#include "net/base/cache_type.h"
#include "net/base/net_errors.h"
-#include "net/disk_cache/backend_impl.h"
+#include "net/disk_cache/blockfile/backend_impl.h"
#include "net/disk_cache/cache_util.h"
#include "net/disk_cache/disk_cache.h"
-#include "net/disk_cache/mem_backend_impl.h"
+#include "net/disk_cache/memory/mem_backend_impl.h"
#include "net/disk_cache/simple/simple_backend_impl.h"
#ifdef USE_TRACING_CACHE_BACKEND
diff --git a/net/disk_cache/disk_cache_test_base.cc b/net/disk_cache/disk_cache_test_base.cc
index 3cf98a86..045765d 100644
--- a/net/disk_cache/disk_cache_test_base.cc
+++ b/net/disk_cache/disk_cache_test_base.cc
@@ -11,11 +11,11 @@
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/base/test_completion_callback.h"
-#include "net/disk_cache/backend_impl.h"
+#include "net/disk_cache/blockfile/backend_impl.h"
#include "net/disk_cache/cache_util.h"
#include "net/disk_cache/disk_cache.h"
#include "net/disk_cache/disk_cache_test_util.h"
-#include "net/disk_cache/mem_backend_impl.h"
+#include "net/disk_cache/memory/mem_backend_impl.h"
#include "net/disk_cache/simple/simple_backend_impl.h"
#include "net/disk_cache/simple/simple_index.h"
diff --git a/net/disk_cache/disk_cache_test_util.cc b/net/disk_cache/disk_cache_test_util.cc
index 8f334f0..2b23ee4 100644
--- a/net/disk_cache/disk_cache_test_util.cc
+++ b/net/disk_cache/disk_cache_test_util.cc
@@ -9,9 +9,9 @@
#include "base/message_loop/message_loop_proxy.h"
#include "base/path_service.h"
#include "net/base/net_errors.h"
-#include "net/disk_cache/backend_impl.h"
+#include "net/disk_cache/blockfile/backend_impl.h"
+#include "net/disk_cache/blockfile/file.h"
#include "net/disk_cache/cache_util.h"
-#include "net/disk_cache/file.h"
using base::Time;
using base::TimeDelta;
diff --git a/net/disk_cache/entry_unittest.cc b/net/disk_cache/entry_unittest.cc
index f9cb798..d8334f3 100644
--- a/net/disk_cache/entry_unittest.cc
+++ b/net/disk_cache/entry_unittest.cc
@@ -14,11 +14,11 @@
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/base/test_completion_callback.h"
-#include "net/disk_cache/backend_impl.h"
+#include "net/disk_cache/blockfile/backend_impl.h"
+#include "net/disk_cache/blockfile/entry_impl.h"
#include "net/disk_cache/disk_cache_test_base.h"
#include "net/disk_cache/disk_cache_test_util.h"
-#include "net/disk_cache/entry_impl.h"
-#include "net/disk_cache/mem_entry_impl.h"
+#include "net/disk_cache/memory/mem_entry_impl.h"
#include "net/disk_cache/simple/simple_entry_format.h"
#include "net/disk_cache/simple/simple_entry_impl.h"
#include "net/disk_cache/simple/simple_synchronous_entry.h"
diff --git a/net/disk_cache/mem_backend_impl.cc b/net/disk_cache/memory/mem_backend_impl.cc
index ccd868b..e69c00e 100644
--- a/net/disk_cache/mem_backend_impl.cc
+++ b/net/disk_cache/memory/mem_backend_impl.cc
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/mem_backend_impl.h"
+#include "net/disk_cache/memory/mem_backend_impl.h"
#include "base/logging.h"
#include "base/sys_info.h"
#include "net/base/net_errors.h"
#include "net/disk_cache/cache_util.h"
-#include "net/disk_cache/mem_entry_impl.h"
+#include "net/disk_cache/memory/mem_entry_impl.h"
using base::Time;
diff --git a/net/disk_cache/mem_backend_impl.h b/net/disk_cache/memory/mem_backend_impl.h
index 8da39cc..5f31be5 100644
--- a/net/disk_cache/mem_backend_impl.h
+++ b/net/disk_cache/memory/mem_backend_impl.h
@@ -4,13 +4,13 @@
// See net/disk_cache/disk_cache.h for the public interface of the cache.
-#ifndef NET_DISK_CACHE_MEM_BACKEND_IMPL_H__
-#define NET_DISK_CACHE_MEM_BACKEND_IMPL_H__
+#ifndef NET_DISK_CACHE_MEMORY_MEM_BACKEND_IMPL_H_
+#define NET_DISK_CACHE_MEMORY_MEM_BACKEND_IMPL_H_
#include "base/compiler_specific.h"
#include "base/containers/hash_tables.h"
#include "net/disk_cache/disk_cache.h"
-#include "net/disk_cache/mem_rankings.h"
+#include "net/disk_cache/memory/mem_rankings.h"
namespace net {
class NetLog;
@@ -117,4 +117,4 @@ class NET_EXPORT_PRIVATE MemBackendImpl : public Backend {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_MEM_BACKEND_IMPL_H__
+#endif // NET_DISK_CACHE_MEMORY_MEM_BACKEND_IMPL_H_
diff --git a/net/disk_cache/mem_entry_impl.cc b/net/disk_cache/memory/mem_entry_impl.cc
index 7d00958..0b6d858 100644
--- a/net/disk_cache/mem_entry_impl.cc
+++ b/net/disk_cache/memory/mem_entry_impl.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/mem_entry_impl.h"
+#include "net/disk_cache/memory/mem_entry_impl.h"
#include "base/bind.h"
#include "base/logging.h"
@@ -10,7 +10,7 @@
#include "base/values.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
-#include "net/disk_cache/mem_backend_impl.h"
+#include "net/disk_cache/memory/mem_backend_impl.h"
#include "net/disk_cache/net_log_parameters.h"
using base::Time;
diff --git a/net/disk_cache/mem_entry_impl.h b/net/disk_cache/memory/mem_entry_impl.h
index b84cc39..aec8d22 100644
--- a/net/disk_cache/mem_entry_impl.h
+++ b/net/disk_cache/memory/mem_entry_impl.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_DISK_CACHE_MEM_ENTRY_IMPL_H_
-#define NET_DISK_CACHE_MEM_ENTRY_IMPL_H_
+#ifndef NET_DISK_CACHE_MEMORY_MEM_ENTRY_IMPL_H_
+#define NET_DISK_CACHE_MEMORY_MEM_ENTRY_IMPL_H_
#include "base/containers/hash_tables.h"
#include "base/gtest_prod_util.h"
@@ -182,4 +182,4 @@ class MemEntryImpl : public Entry {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_MEM_ENTRY_IMPL_H_
+#endif // NET_DISK_CACHE_MEMORY_MEM_ENTRY_IMPL_H_
diff --git a/net/disk_cache/mem_rankings.cc b/net/disk_cache/memory/mem_rankings.cc
index d5f4a65..ba5e00b 100644
--- a/net/disk_cache/mem_rankings.cc
+++ b/net/disk_cache/memory/mem_rankings.cc
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/mem_rankings.h"
+#include "net/disk_cache/memory/mem_rankings.h"
#include "base/logging.h"
-#include "net/disk_cache/mem_entry_impl.h"
+#include "net/disk_cache/memory/mem_entry_impl.h"
namespace disk_cache {
diff --git a/net/disk_cache/mem_rankings.h b/net/disk_cache/memory/mem_rankings.h
index fa90688..b75bfc1 100644
--- a/net/disk_cache/mem_rankings.h
+++ b/net/disk_cache/memory/mem_rankings.h
@@ -4,8 +4,8 @@
// See net/disk_cache/disk_cache.h for the public interface.
-#ifndef NET_DISK_CACHE_MEM_RANKINGS_H__
-#define NET_DISK_CACHE_MEM_RANKINGS_H__
+#ifndef NET_DISK_CACHE_MEMORY_MEM_RANKINGS_H_
+#define NET_DISK_CACHE_MEMORY_MEM_RANKINGS_H_
#include "base/basictypes.h"
@@ -41,4 +41,4 @@ class MemRankings {
} // namespace disk_cache
-#endif // NET_DISK_CACHE_MEM_RANKINGS_H__
+#endif // NET_DISK_CACHE_MEMORY_MEM_RANKINGS_H_
diff --git a/net/disk_cache/tracing_cache_backend.cc b/net/disk_cache/tracing/tracing_cache_backend.cc
index 4966133..1efdb99 100644
--- a/net/disk_cache/tracing_cache_backend.cc
+++ b/net/disk_cache/tracing/tracing_cache_backend.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/disk_cache/tracing_cache_backend.h"
+#include "net/disk_cache/tracing/tracing_cache_backend.h"
#include "net/base/net_errors.h"
diff --git a/net/disk_cache/tracing_cache_backend.h b/net/disk_cache/tracing/tracing_cache_backend.h
index 304a733..b8d1869 100644
--- a/net/disk_cache/tracing_cache_backend.h
+++ b/net/disk_cache/tracing/tracing_cache_backend.h
@@ -2,12 +2,15 @@
// 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_CACHE_BACKEND_H_
-#define NET_DISK_CACHE_TRACING_CACHE_BACKEND_H_
+#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"
-#include "net/disk_cache/stats.h"
namespace disk_cache {
@@ -78,4 +81,4 @@ class NET_EXPORT TracingCacheBackend : public Backend,
} // namespace disk_cache
-#endif // NET_DISK_CACHE_TRACING_CACHE_BACKEND_H_
+#endif // NET_DISK_CACHE_TRACING_TRACING_CACHE_BACKEND_H_
diff --git a/net/net.gyp b/net/net.gyp
index cc6a1f6..1a9b78e 100644
--- a/net/net.gyp
+++ b/net/net.gyp
@@ -349,70 +349,93 @@
'cookies/cookie_util.h',
'cookies/parsed_cookie.cc',
'cookies/parsed_cookie.h',
- 'disk_cache/addr.cc',
- 'disk_cache/addr.h',
- 'disk_cache/backend_impl.cc',
- 'disk_cache/backend_impl.h',
- 'disk_cache/bitmap.cc',
- 'disk_cache/bitmap.h',
- 'disk_cache/block_files.cc',
- 'disk_cache/block_files.h',
+ 'disk_cache/blockfile/addr.cc',
+ 'disk_cache/blockfile/addr.h',
+ 'disk_cache/blockfile/backend_impl.cc',
+ 'disk_cache/blockfile/backend_impl.h',
+ 'disk_cache/blockfile/backend_impl_v3.cc',
+ 'disk_cache/blockfile/backend_impl_v3.h',
+ 'disk_cache/blockfile/bitmap.cc',
+ 'disk_cache/blockfile/bitmap.h',
+ 'disk_cache/blockfile/block_bitmaps_v3.cc',
+ 'disk_cache/blockfile/block_bitmaps_v3.h',
+ 'disk_cache/blockfile/block_files.cc',
+ 'disk_cache/blockfile/block_files.h',
+ 'disk_cache/blockfile/disk_format.cc',
+ 'disk_cache/blockfile/disk_format.h',
+ 'disk_cache/blockfile/disk_format_base.h',
+ 'disk_cache/blockfile/disk_format_v3.h',
+ 'disk_cache/blockfile/entry_impl.cc',
+ 'disk_cache/blockfile/entry_impl.h',
+ 'disk_cache/blockfile/entry_impl_v3.cc',
+ 'disk_cache/blockfile/entry_impl_v3.h',
+ 'disk_cache/blockfile/errors.h',
+ 'disk_cache/blockfile/eviction.cc',
+ 'disk_cache/blockfile/eviction.h',
+ 'disk_cache/blockfile/eviction_v3.cc',
+ 'disk_cache/blockfile/eviction_v3.h',
+ 'disk_cache/blockfile/experiments.h',
+ 'disk_cache/blockfile/file.cc',
+ 'disk_cache/blockfile/file.h',
+ 'disk_cache/blockfile/file_block.h',
+ 'disk_cache/blockfile/file_ios.cc',
+ 'disk_cache/blockfile/file_lock.cc',
+ 'disk_cache/blockfile/file_lock.h',
+ 'disk_cache/blockfile/file_posix.cc',
+ 'disk_cache/blockfile/file_win.cc',
+ 'disk_cache/blockfile/histogram_macros.h',
+ 'disk_cache/blockfile/histogram_macros_v3.h',
+ 'disk_cache/blockfile/in_flight_backend_io.cc',
+ 'disk_cache/blockfile/in_flight_backend_io.h',
+ 'disk_cache/blockfile/in_flight_io.cc',
+ 'disk_cache/blockfile/in_flight_io.h',
+ 'disk_cache/blockfile/index_table_v3.cc',
+ 'disk_cache/blockfile/index_table_v3.h',
+ 'disk_cache/blockfile/mapped_file.cc',
+ 'disk_cache/blockfile/mapped_file.h',
+ 'disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc',
+ 'disk_cache/blockfile/mapped_file_posix.cc',
+ 'disk_cache/blockfile/mapped_file_win.cc',
+ 'disk_cache/blockfile/rankings.cc',
+ 'disk_cache/blockfile/rankings.h',
+ 'disk_cache/blockfile/sparse_control.cc',
+ 'disk_cache/blockfile/sparse_control.h',
+ 'disk_cache/blockfile/stats.cc',
+ 'disk_cache/blockfile/stats.h',
+ 'disk_cache/blockfile/stats_histogram.cc',
+ 'disk_cache/blockfile/stats_histogram.h',
+ 'disk_cache/blockfile/storage_block-inl.h',
+ 'disk_cache/blockfile/storage_block.h',
+ 'disk_cache/blockfile/stress_support.h',
+ 'disk_cache/blockfile/trace.cc',
+ 'disk_cache/blockfile/trace.h',
'disk_cache/cache_creator.cc',
- 'disk_cache/cache_util.h',
'disk_cache/cache_util.cc',
+ 'disk_cache/cache_util.h',
'disk_cache/cache_util_posix.cc',
'disk_cache/cache_util_win.cc',
'disk_cache/disk_cache.h',
- 'disk_cache/disk_format.cc',
- 'disk_cache/disk_format.h',
- 'disk_cache/disk_format_base.h',
- 'disk_cache/entry_impl.cc',
- 'disk_cache/entry_impl.h',
- 'disk_cache/errors.h',
- 'disk_cache/eviction.cc',
- 'disk_cache/eviction.h',
- 'disk_cache/experiments.h',
- 'disk_cache/file.cc',
- 'disk_cache/file.h',
- 'disk_cache/file_block.h',
- 'disk_cache/file_ios.cc',
- 'disk_cache/file_lock.cc',
- 'disk_cache/file_lock.h',
- 'disk_cache/file_posix.cc',
- 'disk_cache/file_win.cc',
- 'disk_cache/histogram_macros.h',
- 'disk_cache/in_flight_backend_io.cc',
- 'disk_cache/in_flight_backend_io.h',
- 'disk_cache/in_flight_io.cc',
- 'disk_cache/in_flight_io.h',
- 'disk_cache/mapped_file.cc',
- 'disk_cache/mapped_file.h',
- 'disk_cache/mapped_file_posix.cc',
- 'disk_cache/mapped_file_avoid_mmap_posix.cc',
- 'disk_cache/mapped_file_win.cc',
- 'disk_cache/mem_backend_impl.cc',
- 'disk_cache/mem_backend_impl.h',
- 'disk_cache/mem_entry_impl.cc',
- 'disk_cache/mem_entry_impl.h',
- 'disk_cache/mem_rankings.cc',
- 'disk_cache/mem_rankings.h',
+ 'disk_cache/flash/flash_entry_impl.cc',
+ 'disk_cache/flash/flash_entry_impl.h',
+ 'disk_cache/flash/format.h',
+ 'disk_cache/flash/internal_entry.cc',
+ 'disk_cache/flash/internal_entry.h',
+ 'disk_cache/flash/log_store.cc',
+ 'disk_cache/flash/log_store.h',
+ 'disk_cache/flash/log_store_entry.cc',
+ 'disk_cache/flash/log_store_entry.h',
+ 'disk_cache/flash/segment.cc',
+ 'disk_cache/flash/segment.h',
+ 'disk_cache/flash/storage.cc',
+ 'disk_cache/flash/storage.h',
+ 'disk_cache/memory/mem_backend_impl.cc',
+ 'disk_cache/memory/mem_backend_impl.h',
+ 'disk_cache/memory/mem_entry_impl.cc',
+ 'disk_cache/memory/mem_entry_impl.h',
+ 'disk_cache/memory/mem_rankings.cc',
+ 'disk_cache/memory/mem_rankings.h',
'disk_cache/net_log_parameters.cc',
'disk_cache/net_log_parameters.h',
- 'disk_cache/rankings.cc',
- 'disk_cache/rankings.h',
- 'disk_cache/sparse_control.cc',
- 'disk_cache/sparse_control.h',
- 'disk_cache/stats.cc',
- 'disk_cache/stats.h',
- 'disk_cache/stats_histogram.cc',
- 'disk_cache/stats_histogram.h',
- 'disk_cache/storage_block-inl.h',
- 'disk_cache/storage_block.h',
- 'disk_cache/stress_support.h',
- 'disk_cache/trace.cc',
- 'disk_cache/trace.h',
- 'disk_cache/tracing_cache_backend.cc',
- 'disk_cache/tracing_cache_backend.h',
'disk_cache/simple/simple_backend_impl.cc',
'disk_cache/simple/simple_backend_impl.h',
'disk_cache/simple/simple_backend_version.h',
@@ -439,31 +462,8 @@
'disk_cache/simple/simple_util.h',
'disk_cache/simple/simple_version_upgrade.cc',
'disk_cache/simple/simple_version_upgrade.h',
- 'disk_cache/flash/flash_entry_impl.cc',
- 'disk_cache/flash/flash_entry_impl.h',
- 'disk_cache/flash/format.h',
- 'disk_cache/flash/internal_entry.cc',
- 'disk_cache/flash/internal_entry.h',
- 'disk_cache/flash/log_store.cc',
- 'disk_cache/flash/log_store.h',
- 'disk_cache/flash/log_store_entry.cc',
- 'disk_cache/flash/log_store_entry.h',
- 'disk_cache/flash/segment.cc',
- 'disk_cache/flash/segment.h',
- 'disk_cache/flash/storage.cc',
- 'disk_cache/flash/storage.h',
- 'disk_cache/v3/backend_impl_v3.cc',
- 'disk_cache/v3/backend_impl_v3.h',
- 'disk_cache/v3/block_bitmaps.cc',
- 'disk_cache/v3/block_bitmaps.h',
- 'disk_cache/v3/disk_format_v3.h',
- 'disk_cache/v3/entry_impl_v3.cc',
- 'disk_cache/v3/entry_impl_v3.h',
- 'disk_cache/v3/eviction_v3.cc',
- 'disk_cache/v3/eviction_v3.h',
- 'disk_cache/v3/histogram_macros.h',
- 'disk_cache/v3/index_table.cc',
- 'disk_cache/v3/index_table.h',
+ 'disk_cache/tracing/tracing_cache_backend.cc',
+ 'disk_cache/tracing/tracing_cache_backend.h',
'dns/address_sorter.h',
'dns/address_sorter_posix.cc',
'dns/address_sorter_posix.h',
@@ -1317,11 +1317,11 @@
],
},
'sources!': [
- 'disk_cache/mapped_file_posix.cc',
+ 'disk_cache/blockfile/mapped_file_posix.cc',
],
}, { # else
'sources!': [
- 'disk_cache/mapped_file_avoid_mmap_posix.cc',
+ 'disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc',
],
}],
['disable_ftp_support==1', {
@@ -1714,26 +1714,27 @@
'cookies/cookie_store_unittest.h',
'cookies/cookie_util_unittest.cc',
'cookies/parsed_cookie_unittest.cc',
- 'disk_cache/addr_unittest.cc',
'disk_cache/backend_unittest.cc',
- 'disk_cache/bitmap_unittest.cc',
- 'disk_cache/block_files_unittest.cc',
+ 'disk_cache/blockfile/addr_unittest.cc',
+ 'disk_cache/blockfile/bitmap_unittest.cc',
+ 'disk_cache/blockfile/block_bitmaps_v3_unittest.cc',
+ 'disk_cache/blockfile/block_bitmaps_v3_unittest.cc',
+ 'disk_cache/blockfile/block_files_unittest.cc',
+ 'disk_cache/blockfile/index_table_v3_unittest.cc',
+ 'disk_cache/blockfile/mapped_file_unittest.cc',
+ 'disk_cache/blockfile/storage_block_unittest.cc',
'disk_cache/cache_util_unittest.cc',
'disk_cache/entry_unittest.cc',
- 'disk_cache/mapped_file_unittest.cc',
+ 'disk_cache/flash/log_store_entry_unittest.cc',
+ 'disk_cache/flash/log_store_unittest.cc',
+ 'disk_cache/flash/segment_unittest.cc',
+ 'disk_cache/flash/storage_unittest.cc',
'disk_cache/simple/simple_index_file_unittest.cc',
'disk_cache/simple/simple_index_unittest.cc',
- 'disk_cache/simple/simple_test_util.h',
'disk_cache/simple/simple_test_util.cc',
+ 'disk_cache/simple/simple_test_util.h',
'disk_cache/simple/simple_util_unittest.cc',
'disk_cache/simple/simple_version_upgrade_unittest.cc',
- 'disk_cache/storage_block_unittest.cc',
- 'disk_cache/flash/log_store_entry_unittest.cc',
- 'disk_cache/flash/log_store_unittest.cc',
- 'disk_cache/flash/segment_unittest.cc',
- 'disk_cache/flash/storage_unittest.cc',
- 'disk_cache/v3/block_bitmaps_unittest.cc',
- 'disk_cache/v3/index_table_unittest.cc',
'dns/address_sorter_posix_unittest.cc',
'dns/address_sorter_unittest.cc',
'dns/dns_config_service_posix_unittest.cc',
@@ -2147,7 +2148,7 @@
[ 'OS == "android"', {
'sources!': [
# See bug 344533.
- 'disk_cache/v3/index_table_unittest.cc',
+ 'disk_cache/blockfile/index_table_v3unittest.cc',
# No res_ninit() et al on Android, so this doesn't make a lot of
# sense.
'dns/dns_config_service_posix_unittest.cc',
@@ -2397,7 +2398,7 @@
],
'sources': [
'cookies/cookie_monster_perftest.cc',
- 'disk_cache/disk_cache_perftest.cc',
+ 'disk_cache/blockfile/disk_cache_perftest.cc',
'proxy/proxy_resolver_perftest.cc',
],
'conditions': [
@@ -2825,7 +2826,7 @@
'net_test_support',
],
'sources': [
- 'disk_cache/stress_cache.cc',
+ 'disk_cache/blockfile/stress_cache.cc',
],
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [4267, ],
diff --git a/net/tools/crash_cache/crash_cache.cc b/net/tools/crash_cache/crash_cache.cc
index 32934a6..3687bd9 100644
--- a/net/tools/crash_cache/crash_cache.cc
+++ b/net/tools/crash_cache/crash_cache.cc
@@ -25,10 +25,10 @@
#include "net/base/net_errors.h"
#include "net/base/net_export.h"
#include "net/base/test_completion_callback.h"
-#include "net/disk_cache/backend_impl.h"
+#include "net/disk_cache/blockfile/backend_impl.h"
+#include "net/disk_cache/blockfile/rankings.h"
#include "net/disk_cache/disk_cache.h"
#include "net/disk_cache/disk_cache_test_util.h"
-#include "net/disk_cache/rankings.h"
using base::Time;
diff --git a/net/tools/dump_cache/cache_dumper.cc b/net/tools/dump_cache/cache_dumper.cc
index 7d29a5c..2898164 100644
--- a/net/tools/dump_cache/cache_dumper.cc
+++ b/net/tools/dump_cache/cache_dumper.cc
@@ -8,7 +8,7 @@
#include "base/strings/utf_string_conversions.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
-#include "net/disk_cache/entry_impl.h"
+#include "net/disk_cache/blockfile/entry_impl.h"
#include "net/http/http_cache.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_response_info.h"
diff --git a/net/tools/dump_cache/cache_dumper.h b/net/tools/dump_cache/cache_dumper.h
index 4bdf4a1..9c5837c 100644
--- a/net/tools/dump_cache/cache_dumper.h
+++ b/net/tools/dump_cache/cache_dumper.h
@@ -8,7 +8,7 @@
#include <string>
#include "base/files/file_path.h"
-#include "net/disk_cache/backend_impl.h"
+#include "net/disk_cache/blockfile/backend_impl.h"
#ifdef WIN32
// Dumping the cache often creates very large filenames, which are tricky
diff --git a/net/tools/dump_cache/dump_cache.cc b/net/tools/dump_cache/dump_cache.cc
index d4ccc29..08390a3 100644
--- a/net/tools/dump_cache/dump_cache.cc
+++ b/net/tools/dump_cache/dump_cache.cc
@@ -13,7 +13,7 @@
#include "base/strings/string16.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
-#include "net/disk_cache/disk_format.h"
+#include "net/disk_cache/blockfile/disk_format.h"
#include "net/tools/dump_cache/dump_files.h"
#include "net/tools/dump_cache/simple_cache_dumper.h"
diff --git a/net/tools/dump_cache/dump_files.cc b/net/tools/dump_cache/dump_files.cc
index 78b5d34..6078778 100644
--- a/net/tools/dump_cache/dump_files.cc
+++ b/net/tools/dump_cache/dump_files.cc
@@ -18,12 +18,12 @@
#include "base/format_macros.h"
#include "base/message_loop/message_loop.h"
#include "net/base/file_stream.h"
-#include "net/disk_cache/block_files.h"
-#include "net/disk_cache/disk_format.h"
-#include "net/disk_cache/mapped_file.h"
-#include "net/disk_cache/stats.h"
-#include "net/disk_cache/storage_block-inl.h"
-#include "net/disk_cache/storage_block.h"
+#include "net/disk_cache/blockfile/block_files.h"
+#include "net/disk_cache/blockfile/disk_format.h"
+#include "net/disk_cache/blockfile/mapped_file.h"
+#include "net/disk_cache/blockfile/stats.h"
+#include "net/disk_cache/blockfile/storage_block-inl.h"
+#include "net/disk_cache/blockfile/storage_block.h"
namespace {
diff --git a/net/tools/dump_cache/upgrade_win.cc b/net/tools/dump_cache/upgrade_win.cc
index 68744d3..dfb9e5c 100644
--- a/net/tools/dump_cache/upgrade_win.cc
+++ b/net/tools/dump_cache/upgrade_win.cc
@@ -17,8 +17,8 @@
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/base/test_completion_callback.h"
-#include "net/disk_cache/backend_impl.h"
-#include "net/disk_cache/entry_impl.h"
+#include "net/disk_cache/blockfile/backend_impl.h"
+#include "net/disk_cache/blockfile/entry_impl.h"
#include "net/http/http_cache.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_response_info.h"