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

Side by Side Diff: content/browser/appcache/appcache_host_unittest.cc

Issue 1782053004: Change how the quota system computes the total poolsize for temporary storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/appcache/appcache_host.h" 5 #include "content/browser/appcache/appcache_host.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 const GURL& origin, 103 const GURL& origin,
104 storage::StorageType type, 104 storage::StorageType type,
105 int64_t delta) override {} 105 int64_t delta) override {}
106 void SetUsageCacheEnabled(storage::QuotaClient::ID client_id, 106 void SetUsageCacheEnabled(storage::QuotaClient::ID client_id,
107 const GURL& origin, 107 const GURL& origin,
108 storage::StorageType type, 108 storage::StorageType type,
109 bool enabled) override {} 109 bool enabled) override {}
110 void GetUsageAndQuota(base::SequencedTaskRunner* original_task_runner, 110 void GetUsageAndQuota(base::SequencedTaskRunner* original_task_runner,
111 const GURL& origin, 111 const GURL& origin,
112 storage::StorageType type, 112 storage::StorageType type,
113 const GetUsageAndQuotaCallback& callback) override {} 113 const UsageAndQuotaCallback& callback) override {}
114 114
115 void NotifyOriginInUse(const GURL& origin) override { inuse_[origin] += 1; } 115 void NotifyOriginInUse(const GURL& origin) override { inuse_[origin] += 1; }
116 116
117 void NotifyOriginNoLongerInUse(const GURL& origin) override { 117 void NotifyOriginNoLongerInUse(const GURL& origin) override {
118 inuse_[origin] -= 1; 118 inuse_[origin] -= 1;
119 } 119 }
120 120
121 int GetInUseCount(const GURL& origin) { 121 int GetInUseCount(const GURL& origin) {
122 return inuse_[origin]; 122 return inuse_[origin];
123 } 123 }
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 EXPECT_TRUE(host.SelectCache(kDocAndOriginUrl, kAppCacheNoCacheId, GURL())); 541 EXPECT_TRUE(host.SelectCache(kDocAndOriginUrl, kAppCacheNoCacheId, GURL()));
542 542
543 // Select methods should bail if cache has already been selected. 543 // Select methods should bail if cache has already been selected.
544 EXPECT_FALSE(host.SelectCache(kDocAndOriginUrl, kAppCacheNoCacheId, GURL())); 544 EXPECT_FALSE(host.SelectCache(kDocAndOriginUrl, kAppCacheNoCacheId, GURL()));
545 EXPECT_FALSE(host.SelectCacheForWorker(0, 0)); 545 EXPECT_FALSE(host.SelectCacheForWorker(0, 0));
546 EXPECT_FALSE(host.SelectCacheForSharedWorker(kAppCacheNoCacheId)); 546 EXPECT_FALSE(host.SelectCacheForSharedWorker(kAppCacheNoCacheId));
547 EXPECT_FALSE(host.MarkAsForeignEntry(kDocAndOriginUrl, kAppCacheNoCacheId)); 547 EXPECT_FALSE(host.MarkAsForeignEntry(kDocAndOriginUrl, kAppCacheNoCacheId));
548 } 548 }
549 549
550 } // namespace content 550 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698