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

Unified Diff: net/disk_cache/disk_cache_test_base.h

Issue 1135002: Disk cache" Convert some of the unit tests to the new... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/backend_unittest.cc ('k') | net/disk_cache/disk_cache_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/disk_cache_test_base.h
===================================================================
--- net/disk_cache/disk_cache_test_base.h (revision 41901)
+++ net/disk_cache/disk_cache_test_base.h (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,6 +6,7 @@
#define NET_DISK_CACHE_DISK_CACHE_TEST_BASE_H_
#include "base/basictypes.h"
+#include "base/time.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -15,6 +16,7 @@
class Backend;
class BackendImpl;
+class Entry;
class MemBackendImpl;
} // namespace disk_cache
@@ -72,6 +74,16 @@
integrity_ = false;
}
+ // Utility methods to access the cache and wait for each operation to finish.
+ int OpenEntry(const std::string& key, disk_cache::Entry** entry);
+ int CreateEntry(const std::string& key, disk_cache::Entry** entry);
+ int DoomEntry(const std::string& key);
+ int DoomAllEntries();
+ int DoomEntriesBetween(const base::Time initial_time,
+ const base::Time end_time);
+ int DoomEntriesSince(const base::Time initial_time);
+ int OpenNextEntry(void** iter, disk_cache::Entry** next_entry);
+
// cache_ will always have a valid object, regardless of how the cache was
// initialized. The implementation pointers can be NULL.
disk_cache::Backend* cache_;
« no previous file with comments | « net/disk_cache/backend_unittest.cc ('k') | net/disk_cache/disk_cache_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698