Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef WEBKIT_QUOTA_QUOTA_TEMPORARY_STORAGE_EVICTOR_H_ | |
| 6 #define WEBKIT_QUOTA_QUOTA_TEMPORARY_STORAGE_EVICTOR_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "base/message_loop_proxy.h" | |
| 10 #include "webkit/quota/quota_database.h" | |
| 11 #include "webkit/quota/quota_manager.h" | |
| 12 #include "webkit/quota/quota_task.h" | |
| 13 #include "webkit/quota/quota_types.h" | |
| 14 | |
| 15 class GURL; | |
| 16 | |
| 17 namespace quota { | |
| 18 | |
| 19 class QuotaTemporaryStorageEvictor { | |
| 20 public: | |
| 21 QuotaTemporaryStorageEvictor( | |
| 22 QuotaManager* manager, | |
| 23 QuotaDatabase* database, | |
| 24 int64 delay_ms, | |
| 25 scoped_refptr<base::MessageLoopProxy> db_message_loop); | |
| 26 virtual ~QuotaTemporaryStorageEvictor(); | |
| 27 | |
| 28 void Start(); | |
| 29 | |
| 30 private: | |
| 31 QuotaManager* manager_; | |
| 32 QuotaDatabase* database_; | |
| 33 int delay_ms_; | |
| 34 scoped_refptr<base::MessageLoopProxy> db_message_loop_; | |
| 35 | |
| 36 int num_clients_; | |
| 37 int num_deleted_; | |
|
kinuko
2011/05/11 12:43:30
just to improve readability, maybe they can be
num
Dai Mikurube (NOT FULLTIME)
2011/05/12 02:45:50
Done. Chose num_deleted_clients.
| |
| 38 | |
| 39 ScopedRunnableMethodFactory<QuotaTemporaryStorageEvictor> runnable_factory_; | |
| 40 | |
| 41 void Evict(); | |
| 42 void OnDeleted(QuotaStatusCode status); | |
|
kinuko
2011/05/11 12:43:30
style nit: declaration order (from what I was told
Dai Mikurube (NOT FULLTIME)
2011/05/12 02:45:50
Thanks. Re-ordered.
| |
| 43 | |
| 44 DISALLOW_COPY_AND_ASSIGN(QuotaTemporaryStorageEvictor); | |
| 45 }; | |
| 46 | |
| 47 } // namespace quota | |
| 48 | |
| 49 #endif // WEBKIT_QUOTA_QUOTA_TEMPORARY_STORAGE_EVICTOR_H_ | |
| OLD | NEW |