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

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

Issue 2901083002: [CacheStorage] Pad and bin opaque resource sizes. (Closed)
Patch Set: s/also also/also/ and EXPECT_GT ↔ EXPECT_LT Created 3 years, 4 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 | « content/browser/cache_storage/README.md ('k') | content/browser/cache_storage/cache_storage.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..8f59a8eb3f4bb837629882c4a61999c94bee7eea 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"
@@ -119,12 +120,13 @@ class CONTENT_EXPORT CacheStorage : public CacheStorageCacheObserver {
void CompleteAsyncOperationForTesting();
// CacheStorageCacheObserver:
- void CacheSizeUpdated(const CacheStorageCache* cache, int64_t size) override;
+ void CacheSizeUpdated(const CacheStorageCache* cache) override;
private:
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);
« no previous file with comments | « content/browser/cache_storage/README.md ('k') | content/browser/cache_storage/cache_storage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698