OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/browsing_data_quota_helper.h" |
| 6 |
| 7 // static |
| 8 void BrowsingDataQuotaHelperDeleter::Destruct( |
| 9 const BrowsingDataQuotaHelper* helper) { |
| 10 helper->io_thread_->DeleteSoon(FROM_HERE, helper); |
| 11 } |
| 12 |
| 13 BrowsingDataQuotaHelper::BrowsingDataQuotaHelper( |
| 14 base::MessageLoopProxy* io_thread) |
| 15 : io_thread_(io_thread) { |
| 16 } |
| 17 |
| 18 BrowsingDataQuotaHelper::~BrowsingDataQuotaHelper() { |
| 19 } |
| 20 |
| 21 bool operator <(const BrowsingDataQuotaHelper::QuotaInfo& lhs, |
| 22 const BrowsingDataQuotaHelper::QuotaInfo& rhs) { |
| 23 if (lhs.host != rhs.host) |
| 24 return lhs.host < rhs.host; |
| 25 if (lhs.temporary_usage != rhs.temporary_usage) |
| 26 return lhs.temporary_usage < rhs.temporary_usage; |
| 27 if (lhs.persistent_usage != rhs.persistent_usage) |
| 28 return lhs.persistent_usage < rhs.persistent_usage; |
| 29 return lhs.persistent_quota < rhs.persistent_quota; |
| 30 } |
| 31 |
| 32 bool operator ==(const BrowsingDataQuotaHelper::QuotaInfo& lhs, |
| 33 const BrowsingDataQuotaHelper::QuotaInfo& rhs) { |
| 34 return lhs.host == rhs.host && |
| 35 lhs.temporary_usage == rhs.temporary_usage && |
| 36 lhs.persistent_usage == rhs.persistent_usage && |
| 37 lhs.persistent_quota == rhs.persistent_quota; |
| 38 } |
OLD | NEW |