Skip to content

Commit

Permalink
Revert 253581 "Reorganize net/disk_cache into backend specific d..."
Browse files Browse the repository at this point in the history
> 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

TBR=gavinp@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253598 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
gavinp@chromium.org committed Feb 26, 2014
1 parent c1b8d30 commit da0a777
Show file tree
Hide file tree
Showing 94 changed files with 424 additions and 426 deletions.
2 changes: 1 addition & 1 deletion chrome/browser/net/http_pipelining_compatibility_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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/blockfile/histogram_macros.h"
#include "net/disk_cache/histogram_macros.h"
#include "net/http/http_network_layer.h"
#include "net/http/http_network_session.h"
#include "net/http/http_response_headers.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/blockfile/addr.h"
#include "net/disk_cache/addr.h"

#include "base/logging.h"

Expand Down
8 changes: 4 additions & 4 deletions net/disk_cache/blockfile/addr.h → net/disk_cache/addr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_BLOCKFILE_ADDR_H_
#define NET_DISK_CACHE_BLOCKFILE_ADDR_H_
#ifndef NET_DISK_CACHE_ADDR_H_
#define NET_DISK_CACHE_ADDR_H_

#include "net/base/net_export.h"
#include "net/disk_cache/blockfile/disk_format_base.h"
#include "net/disk_cache/disk_format_base.h"

namespace disk_cache {

Expand Down Expand Up @@ -185,4 +185,4 @@ class NET_EXPORT_PRIVATE Addr {

} // namespace disk_cache

#endif // NET_DISK_CACHE_BLOCKFILE_ADDR_H_
#endif // NET_DISK_CACHE_ADDR_H_
Original file line number Diff line number Diff line change
Expand Up @@ -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/blockfile/addr.h"
#include "net/disk_cache/addr.h"
#include "net/disk_cache/disk_cache_test_base.h"
#include "testing/gtest/include/gtest/gtest.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/blockfile/backend_impl.h"
#include "net/disk_cache/backend_impl.h"

#include "base/bind.h"
#include "base/bind_helpers.h"
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@

// See net/disk_cache/disk_cache.h for the public interface of the cache.

#ifndef NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_H_
#define NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_H_
#ifndef NET_DISK_CACHE_BACKEND_IMPL_H_
#define NET_DISK_CACHE_BACKEND_IMPL_H_

#include "base/containers/hash_tables.h"
#include "base/files/file_path.h"
#include "base/timer/timer.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/block_files.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;
Expand Down Expand Up @@ -397,4 +397,4 @@ class NET_EXPORT_PRIVATE BackendImpl : public Backend {

} // namespace disk_cache

#endif // NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_H_
#endif // NET_DISK_CACHE_BACKEND_IMPL_H_
14 changes: 7 additions & 7 deletions net/disk_cache/backend_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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/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/backend_impl.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/memory/mem_backend_impl.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/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/tracing_cache_backend.h"
#include "net/disk_cache/tracing_cache_backend.h"
#include "testing/gtest/include/gtest/gtest.h"

#if defined(OS_WIN)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/blockfile/bitmap.h"
#include "net/disk_cache/bitmap.h"

#include <algorithm>

Expand Down
6 changes: 3 additions & 3 deletions net/disk_cache/blockfile/bitmap.h → net/disk_cache/bitmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_BLOCKFILE_BITMAP_H_
#define NET_DISK_CACHE_BLOCKFILE_BITMAP_H_
#ifndef NET_DISK_CACHE_BITMAP_H_
#define NET_DISK_CACHE_BITMAP_H_

#include "base/basictypes.h"
#include "net/base/net_export.h"
Expand Down Expand Up @@ -133,4 +133,4 @@ class NET_EXPORT_PRIVATE Bitmap {

} // namespace disk_cache

#endif // NET_DISK_CACHE_BLOCKFILE_BITMAP_H_
#endif // NET_DISK_CACHE_BITMAP_H_
Original file line number Diff line number Diff line change
Expand Up @@ -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/blockfile/bitmap.h"
#include "net/disk_cache/bitmap.h"
#include "testing/gtest/include/gtest/gtest.h"

TEST(BitmapTest, OverAllocate) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/blockfile/block_files.h"
#include "net/disk_cache/block_files.h"

#include "base/atomicops.h"
#include "base/files/file_path.h"
Expand All @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@

// See net/disk_cache/disk_cache.h for the public interface.

#ifndef NET_DISK_CACHE_BLOCKFILE_BLOCK_FILES_H_
#define NET_DISK_CACHE_BLOCKFILE_BLOCK_FILES_H_
#ifndef NET_DISK_CACHE_BLOCK_FILES_H_
#define NET_DISK_CACHE_BLOCK_FILES_H_

#include <vector>

#include "base/files/file_path.h"
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
#include "net/base/net_export.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"
#include "net/disk_cache/addr.h"
#include "net/disk_cache/disk_format_base.h"
#include "net/disk_cache/mapped_file.h"

namespace base {
class ThreadChecker;
Expand Down Expand Up @@ -166,4 +166,4 @@ class NET_EXPORT_PRIVATE BlockFiles {

} // namespace disk_cache

#endif // NET_DISK_CACHE_BLOCKFILE_BLOCK_FILES_H_
#endif // NET_DISK_CACHE_BLOCK_FILES_H_
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "base/file_util.h"
#include "base/files/file_enumerator.h"
#include "net/disk_cache/blockfile/block_files.h"
#include "net/disk_cache/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"
Expand All @@ -25,7 +25,7 @@ int NumberOfFiles(const base::FilePath& path) {
return count;
}

} // namespace
} // namespace;

namespace disk_cache {

Expand Down
4 changes: 2 additions & 2 deletions net/disk_cache/cache_creator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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/blockfile/backend_impl.h"
#include "net/disk_cache/backend_impl.h"
#include "net/disk_cache/cache_util.h"
#include "net/disk_cache/disk_cache.h"
#include "net/disk_cache/memory/mem_backend_impl.h"
#include "net/disk_cache/mem_backend_impl.h"
#include "net/disk_cache/simple/simple_backend_impl.h"

#ifdef USE_TRACING_CACHE_BACKEND
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/blockfile/backend_impl.h"
#include "net/disk_cache/blockfile/block_files.h"
#include "net/disk_cache/backend_impl.h"
#include "net/disk_cache/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"
Expand Down
4 changes: 2 additions & 2 deletions net/disk_cache/disk_cache_test_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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/blockfile/backend_impl.h"
#include "net/disk_cache/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/memory/mem_backend_impl.h"
#include "net/disk_cache/mem_backend_impl.h"
#include "net/disk_cache/simple/simple_backend_impl.h"
#include "net/disk_cache/simple/simple_index.h"

Expand Down
4 changes: 2 additions & 2 deletions net/disk_cache/disk_cache_test_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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/blockfile/backend_impl.h"
#include "net/disk_cache/blockfile/file.h"
#include "net/disk_cache/backend_impl.h"
#include "net/disk_cache/cache_util.h"
#include "net/disk_cache/file.h"

using base::Time;
using base::TimeDelta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/blockfile/disk_format.h"
#include "net/disk_cache/disk_format.h"

namespace disk_cache {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_BLOCKFILE_DISK_FORMAT_H_
#define NET_DISK_CACHE_BLOCKFILE_DISK_FORMAT_H_
#ifndef NET_DISK_CACHE_DISK_FORMAT_H_
#define NET_DISK_CACHE_DISK_FORMAT_H_

#include "base/basictypes.h"
#include "net/base/net_export.h"
#include "net/disk_cache/blockfile/disk_format_base.h"
#include "net/disk_cache/disk_format_base.h"

namespace disk_cache {

Expand Down Expand Up @@ -150,4 +150,4 @@ COMPILE_ASSERT(sizeof(RankingsNode) == 36, bad_RankingsNode);

} // namespace disk_cache

#endif // NET_DISK_CACHE_BLOCKFILE_DISK_FORMAT_H_
#endif // NET_DISK_CACHE_DISK_FORMAT_H_
Original file line number Diff line number Diff line change
Expand Up @@ -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_BLOCKFILE_DISK_FORMAT_BASE_H_
#define NET_DISK_CACHE_BLOCKFILE_DISK_FORMAT_BASE_H_
#ifndef NET_DISK_CACHE_DISK_FORMAT_BASE_H_
#define NET_DISK_CACHE_DISK_FORMAT_BASE_H_

#include "base/basictypes.h"
#include "net/base/net_export.h"
Expand Down Expand Up @@ -129,4 +129,4 @@ COMPILE_ASSERT(sizeof(SparseData) == sizeof(SparseHeader) + kNumSparseBits / 8,

} // namespace disk_cache

#endif // NET_DISK_CACHE_BLOCKFILE_DISK_FORMAT_BASE_H_
#endif // NET_DISK_CACHE_DISK_FORMAT_BASE_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "net/disk_cache/blockfile/entry_impl.h"
#include "net/disk_cache/entry_impl.h"

#include "base/hash.h"
#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram.h"
#include "base/strings/string_util.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.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/backend_impl.h"
#include "net/disk_cache/bitmap.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_
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_BLOCKFILE_ENTRY_IMPL_H_
#define NET_DISK_CACHE_BLOCKFILE_ENTRY_IMPL_H_
#ifndef NET_DISK_CACHE_ENTRY_IMPL_H_
#define NET_DISK_CACHE_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 {

Expand Down Expand Up @@ -275,4 +275,4 @@ class NET_EXPORT_PRIVATE EntryImpl

} // namespace disk_cache

#endif // NET_DISK_CACHE_BLOCKFILE_ENTRY_IMPL_H_
#endif // NET_DISK_CACHE_ENTRY_IMPL_H_
Loading

0 comments on commit da0a777

Please sign in to comment.