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

Side by Side Diff: webkit/quota/quota_temporary_storage_evictor_unittest.cc

Issue 10416004: RefCounted types should not have public destructors, webkit/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to r140259 Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « webkit/quota/quota_task.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <list> 5 #include <list>
6 #include <map> 6 #include <map>
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 void set_min_available_disk_space_to_start_eviction(int64 value) const { 215 void set_min_available_disk_space_to_start_eviction(int64 value) const {
216 temporary_storage_evictor_->set_min_available_disk_space_to_start_eviction( 216 temporary_storage_evictor_->set_min_available_disk_space_to_start_eviction(
217 value); 217 value);
218 } 218 }
219 219
220 void reset_min_available_disk_space_to_start_eviction() const { 220 void reset_min_available_disk_space_to_start_eviction() const {
221 temporary_storage_evictor_-> 221 temporary_storage_evictor_->
222 reset_min_available_disk_space_to_start_eviction(); 222 reset_min_available_disk_space_to_start_eviction();
223 } 223 }
224 224
225 scoped_ptr<QuotaEvictionHandler> quota_eviction_handler_; 225 scoped_ptr<MockQuotaEvictionHandler> quota_eviction_handler_;
226 scoped_ptr<QuotaTemporaryStorageEvictor> temporary_storage_evictor_; 226 scoped_ptr<QuotaTemporaryStorageEvictor> temporary_storage_evictor_;
227 227
228 int num_get_usage_and_quota_for_eviction_; 228 int num_get_usage_and_quota_for_eviction_;
229 229
230 base::WeakPtrFactory<QuotaTemporaryStorageEvictorTest> weak_factory_; 230 base::WeakPtrFactory<QuotaTemporaryStorageEvictorTest> weak_factory_;
231 231
232 DISALLOW_COPY_AND_ASSIGN(QuotaTemporaryStorageEvictorTest); 232 DISALLOW_COPY_AND_ASSIGN(QuotaTemporaryStorageEvictorTest);
233 }; 233 };
234 234
235 TEST_F(QuotaTemporaryStorageEvictorTest, SimpleEvictionTest) { 235 TEST_F(QuotaTemporaryStorageEvictorTest, SimpleEvictionTest) {
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 quota_eviction_handler()->set_available_space(1000000000); 424 quota_eviction_handler()->set_available_space(1000000000);
425 EXPECT_EQ(3000 + 200 + 500000, quota_eviction_handler()->GetUsage()); 425 EXPECT_EQ(3000 + 200 + 500000, quota_eviction_handler()->GetUsage());
426 set_repeated_eviction(false); 426 set_repeated_eviction(false);
427 temporary_storage_evictor()->Start(); 427 temporary_storage_evictor()->Start();
428 MessageLoop::current()->RunAllPending(); 428 MessageLoop::current()->RunAllPending();
429 // Nothing should have been evicted. 429 // Nothing should have been evicted.
430 EXPECT_EQ(3000 + 200 + 500000, quota_eviction_handler()->GetUsage()); 430 EXPECT_EQ(3000 + 200 + 500000, quota_eviction_handler()->GetUsage());
431 } 431 }
432 432
433 } // namespace quota 433 } // namespace quota
OLDNEW
« no previous file with comments | « webkit/quota/quota_task.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698