OLD | NEW |
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 "webkit/quota/quota_manager.h" | 5 #include "webkit/quota/quota_manager.h" |
6 | 6 |
7 #include <deque> | 7 #include <deque> |
8 #include <algorithm> | 8 #include <algorithm> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 StorageType type, | 673 StorageType type, |
674 GetLRUOriginCallback* callback) { | 674 GetLRUOriginCallback* callback) { |
675 LazyInitialize(); | 675 LazyInitialize(); |
676 if (!db_disabled_) { | 676 if (!db_disabled_) { |
677 scoped_refptr<GetLRUOriginTask> task(new GetLRUOriginTask( | 677 scoped_refptr<GetLRUOriginTask> task(new GetLRUOriginTask( |
678 this, database_.get(), db_thread_, type, origins_in_use_, callback)); | 678 this, database_.get(), db_thread_, type, origins_in_use_, callback)); |
679 task->Start(); | 679 task->Start(); |
680 } | 680 } |
681 } | 681 } |
682 | 682 |
| 683 void QuotaManager::GetUsageAndQuotaForEviction( |
| 684 DeleteOriginDataCallback* callback) { |
| 685 // TODO(dmikurube): Implement it. |
| 686 } |
| 687 |
| 688 void QuotaManager::DeleteOriginData( |
| 689 const GURL& origin, |
| 690 StorageType type, |
| 691 DeleteOriginDataCallback* callback) { |
| 692 // TODO(dmikurube): Implement it. |
| 693 } |
| 694 |
683 UsageTracker* QuotaManager::GetUsageTracker(StorageType type) const { | 695 UsageTracker* QuotaManager::GetUsageTracker(StorageType type) const { |
684 switch (type) { | 696 switch (type) { |
685 case kStorageTypeTemporary: | 697 case kStorageTypeTemporary: |
686 return temporary_usage_tracker_.get(); | 698 return temporary_usage_tracker_.get(); |
687 case kStorageTypePersistent: | 699 case kStorageTypePersistent: |
688 return persistent_usage_tracker_.get(); | 700 return persistent_usage_tracker_.get(); |
689 default: | 701 default: |
690 NOTREACHED(); | 702 NOTREACHED(); |
691 } | 703 } |
692 return NULL; | 704 return NULL; |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 | 804 |
793 QuotaManagerProxy::QuotaManagerProxy( | 805 QuotaManagerProxy::QuotaManagerProxy( |
794 QuotaManager* manager, base::MessageLoopProxy* io_thread) | 806 QuotaManager* manager, base::MessageLoopProxy* io_thread) |
795 : manager_(manager), io_thread_(io_thread) { | 807 : manager_(manager), io_thread_(io_thread) { |
796 } | 808 } |
797 | 809 |
798 QuotaManagerProxy::~QuotaManagerProxy() { | 810 QuotaManagerProxy::~QuotaManagerProxy() { |
799 } | 811 } |
800 | 812 |
801 } // namespace quota | 813 } // namespace quota |
OLD | NEW |