Chromium Code Reviews| Index: webkit/quota/quota_temporary_storage_evictor.h |
| diff --git a/webkit/quota/quota_temporary_storage_evictor.h b/webkit/quota/quota_temporary_storage_evictor.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..42ec68ca70a75b169e935663de5b28d4038bba3e |
| --- /dev/null |
| +++ b/webkit/quota/quota_temporary_storage_evictor.h |
| @@ -0,0 +1,49 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef WEBKIT_QUOTA_QUOTA_TEMPORARY_STORAGE_EVICTOR_H_ |
| +#define WEBKIT_QUOTA_QUOTA_TEMPORARY_STORAGE_EVICTOR_H_ |
| +#pragma once |
| + |
| +#include "base/message_loop_proxy.h" |
| +#include "webkit/quota/quota_database.h" |
| +#include "webkit/quota/quota_manager.h" |
| +#include "webkit/quota/quota_task.h" |
| +#include "webkit/quota/quota_types.h" |
| + |
| +class GURL; |
| + |
| +namespace quota { |
| + |
| +class QuotaTemporaryStorageEvictor { |
| + public: |
| + QuotaTemporaryStorageEvictor( |
| + QuotaManager* manager, |
| + QuotaDatabase* database, |
| + int64 delay_ms, |
| + scoped_refptr<base::MessageLoopProxy> db_message_loop); |
| + virtual ~QuotaTemporaryStorageEvictor(); |
| + |
| + void Start(); |
| + |
| + private: |
| + QuotaManager* manager_; |
| + QuotaDatabase* database_; |
| + int delay_ms_; |
| + scoped_refptr<base::MessageLoopProxy> db_message_loop_; |
| + |
| + int num_clients_; |
| + 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.
|
| + |
| + ScopedRunnableMethodFactory<QuotaTemporaryStorageEvictor> runnable_factory_; |
| + |
| + void Evict(); |
| + 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.
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(QuotaTemporaryStorageEvictor); |
| +}; |
| + |
| +} // namespace quota |
| + |
| +#endif // WEBKIT_QUOTA_QUOTA_TEMPORARY_STORAGE_EVICTOR_H_ |