OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <functional> | 9 #include <functional> |
10 #include <set> | 10 #include <set> |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 callback_.Run(kQuotaErrorInvalidModification); | 653 callback_.Run(kQuotaErrorInvalidModification); |
654 } | 654 } |
655 DeleteSoon(); | 655 DeleteSoon(); |
656 } | 656 } |
657 | 657 |
658 virtual void Aborted() OVERRIDE { | 658 virtual void Aborted() OVERRIDE { |
659 callback_.Run(kQuotaErrorAbort); | 659 callback_.Run(kQuotaErrorAbort); |
660 DeleteSoon(); | 660 DeleteSoon(); |
661 } | 661 } |
662 | 662 |
663 void DidGetOriginsForHost(const std::set<GURL>& origins, StorageType type) { | 663 void DidGetOriginsForHost(const std::set<GURL>& origins) { |
664 DCHECK_GT(remaining_clients_, 0); | 664 DCHECK_GT(remaining_clients_, 0); |
665 | 665 |
666 origins_.insert(origins.begin(), origins.end()); | 666 origins_.insert(origins.begin(), origins.end()); |
667 | 667 |
668 if (--remaining_clients_ == 0) { | 668 if (--remaining_clients_ == 0) { |
669 if (!origins_.empty()) | 669 if (!origins_.empty()) |
670 ScheduleOriginsDeletion(); | 670 ScheduleOriginsDeletion(); |
671 else | 671 else |
672 CallCompleted(); | 672 CallCompleted(); |
673 } | 673 } |
(...skipping 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1676 | 1676 |
1677 QuotaManagerProxy::QuotaManagerProxy( | 1677 QuotaManagerProxy::QuotaManagerProxy( |
1678 QuotaManager* manager, base::SingleThreadTaskRunner* io_thread) | 1678 QuotaManager* manager, base::SingleThreadTaskRunner* io_thread) |
1679 : manager_(manager), io_thread_(io_thread) { | 1679 : manager_(manager), io_thread_(io_thread) { |
1680 } | 1680 } |
1681 | 1681 |
1682 QuotaManagerProxy::~QuotaManagerProxy() { | 1682 QuotaManagerProxy::~QuotaManagerProxy() { |
1683 } | 1683 } |
1684 | 1684 |
1685 } // namespace quota | 1685 } // namespace quota |
OLD | NEW |