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 <algorithm> | 7 #include <algorithm> |
8 #include <deque> | 8 #include <deque> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 int64 quota_; | 748 int64 quota_; |
749 HostQuotaCallback callback_; | 749 HostQuotaCallback callback_; |
750 }; | 750 }; |
751 | 751 |
752 class QuotaManager::UpdatePersistentHostQuotaTask | 752 class QuotaManager::UpdatePersistentHostQuotaTask |
753 : public QuotaManager::DatabaseTaskBase { | 753 : public QuotaManager::DatabaseTaskBase { |
754 public: | 754 public: |
755 UpdatePersistentHostQuotaTask( | 755 UpdatePersistentHostQuotaTask( |
756 QuotaManager* manager, | 756 QuotaManager* manager, |
757 const std::string& host, | 757 const std::string& host, |
758 int new_quota, | 758 int64 new_quota, |
759 const HostQuotaCallback& callback) | 759 const HostQuotaCallback& callback) |
760 : DatabaseTaskBase(manager), | 760 : DatabaseTaskBase(manager), |
761 host_(host), | 761 host_(host), |
762 new_quota_(new_quota), | 762 new_quota_(new_quota), |
763 callback_(callback) { | 763 callback_(callback) { |
764 DCHECK_GE(new_quota_, 0); | 764 DCHECK_GE(new_quota_, 0); |
765 } | 765 } |
766 protected: | 766 protected: |
767 virtual void RunOnTargetThread() OVERRIDE { | 767 virtual void RunOnTargetThread() OVERRIDE { |
768 if (!database()->SetHostQuota(host_, kStorageTypePersistent, new_quota_)) { | 768 if (!database()->SetHostQuota(host_, kStorageTypePersistent, new_quota_)) { |
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1747 | 1747 |
1748 QuotaManagerProxy::QuotaManagerProxy( | 1748 QuotaManagerProxy::QuotaManagerProxy( |
1749 QuotaManager* manager, base::MessageLoopProxy* io_thread) | 1749 QuotaManager* manager, base::MessageLoopProxy* io_thread) |
1750 : manager_(manager), io_thread_(io_thread) { | 1750 : manager_(manager), io_thread_(io_thread) { |
1751 } | 1751 } |
1752 | 1752 |
1753 QuotaManagerProxy::~QuotaManagerProxy() { | 1753 QuotaManagerProxy::~QuotaManagerProxy() { |
1754 } | 1754 } |
1755 | 1755 |
1756 } // namespace quota | 1756 } // namespace quota |
OLD | NEW |