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

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

Issue 8528022: Fix quota value overflow (reland). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years, 1 month 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
« no previous file with comments | « no previous file | webkit/quota/quota_manager_unittest.cc » ('j') | 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 "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
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
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
OLDNEW
« no previous file with comments | « no previous file | webkit/quota/quota_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698