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

Unified Diff: content/browser/cache_storage/cache_storage.h

Issue 2901083002: [CacheStorage] Pad and bin opaque resource sizes. (Closed)
Patch Set: Patch Set 8 changes. Created 3 years, 5 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
Index: content/browser/cache_storage/cache_storage.h
diff --git a/content/browser/cache_storage/cache_storage.h b/content/browser/cache_storage/cache_storage.h
index fe0f2116f37b14f7b83e0dfdd76191870942a802..d019055e8dd3311910022659a7fb0e9612f7bc06 100644
--- a/content/browser/cache_storage/cache_storage.h
+++ b/content/browser/cache_storage/cache_storage.h
@@ -14,6 +14,7 @@
#include "base/callback.h"
#include "base/files/file_path.h"
+#include "base/gtest_prod_util.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
@@ -125,6 +126,7 @@ class CONTENT_EXPORT CacheStorage : public CacheStorageCacheObserver {
friend class CacheStorageCacheHandle;
friend class CacheStorageCache;
friend class CacheStorageManagerTest;
+ FRIEND_TEST_ALL_PREFIXES(CacheStorageManagerTest, PersistedCacheKeyUsed);
class CacheLoader;
class MemoryLoader;
class SimpleCacheLoader;
@@ -132,6 +134,9 @@ class CONTENT_EXPORT CacheStorage : public CacheStorageCacheObserver {
typedef std::map<std::string, std::unique_ptr<CacheStorageCache>> CacheMap;
+ // Generate a new padding key. For testing only and *not thread safe*.
+ static void GenerateNewKeyForTesting();
+
// Functions for exposing handles to CacheStorageCache to clients.
std::unique_ptr<CacheStorageCacheHandle> CreateCacheHandle(
CacheStorageCache* cache);

Powered by Google App Engine
This is Rietveld 408576698