| 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/usage_tracker.h" | 5 #include "webkit/quota/usage_tracker.h" |
| 6 | 6 |
| 7 #include <deque> | 7 #include <deque> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/message_loop_proxy.h" | 11 #include "base/message_loop_proxy.h" |
| 12 #include "base/stl_util-inl.h" | 12 #include "base/stl_util.h" |
| 13 #include "net/base/net_util.h" | 13 #include "net/base/net_util.h" |
| 14 #include "webkit/quota/special_storage_policy.h" | 14 #include "webkit/quota/special_storage_policy.h" |
| 15 | 15 |
| 16 namespace quota { | 16 namespace quota { |
| 17 | 17 |
| 18 // A task class for getting the total amount of data used for a collection of | 18 // A task class for getting the total amount of data used for a collection of |
| 19 // origins. This class is self-destructed. | 19 // origins. This class is self-destructed. |
| 20 class ClientUsageTracker::GatherUsageTaskBase : public QuotaTask { | 20 class ClientUsageTracker::GatherUsageTaskBase : public QuotaTask { |
| 21 public: | 21 public: |
| 22 GatherUsageTaskBase( | 22 GatherUsageTaskBase( |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 // Dispatches the host usage callback. | 467 // Dispatches the host usage callback. |
| 468 host_usage_callbacks_.Run(host, host, type_, host_usage_map_[host]); | 468 host_usage_callbacks_.Run(host, host, type_, host_usage_map_[host]); |
| 469 } | 469 } |
| 470 | 470 |
| 471 bool ClientUsageTracker::IsStorageUnlimited(const GURL& origin) const { | 471 bool ClientUsageTracker::IsStorageUnlimited(const GURL& origin) const { |
| 472 return special_storage_policy_.get() && | 472 return special_storage_policy_.get() && |
| 473 special_storage_policy_->IsStorageUnlimited(origin); | 473 special_storage_policy_->IsStorageUnlimited(origin); |
| 474 } | 474 } |
| 475 | 475 |
| 476 } // namespace quota | 476 } // namespace quota |
| OLD | NEW |