| 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 "chrome/browser/browsing_data_quota_helper.h" | 5 #include "chrome/browser/browsing_data_quota_helper.h" |
| 6 | 6 |
| 7 BrowsingDataQuotaHelper::QuotaInfo::QuotaInfo() | 7 BrowsingDataQuotaHelper::QuotaInfo::QuotaInfo() |
| 8 : temporary_usage(0), | 8 : temporary_usage(0), |
| 9 persistent_usage(0) {} | 9 persistent_usage(0) {} |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 } | 29 } |
| 30 | 30 |
| 31 BrowsingDataQuotaHelper::BrowsingDataQuotaHelper( | 31 BrowsingDataQuotaHelper::BrowsingDataQuotaHelper( |
| 32 base::MessageLoopProxy* io_thread) | 32 base::MessageLoopProxy* io_thread) |
| 33 : io_thread_(io_thread) { | 33 : io_thread_(io_thread) { |
| 34 } | 34 } |
| 35 | 35 |
| 36 BrowsingDataQuotaHelper::~BrowsingDataQuotaHelper() { | 36 BrowsingDataQuotaHelper::~BrowsingDataQuotaHelper() { |
| 37 } | 37 } |
| 38 | 38 |
| 39 bool operator <(const BrowsingDataQuotaHelper::QuotaInfo& lhs, | 39 bool BrowsingDataQuotaHelper::QuotaInfo::operator <( |
| 40 const BrowsingDataQuotaHelper::QuotaInfo& rhs) { | 40 const BrowsingDataQuotaHelper::QuotaInfo& rhs) const { |
| 41 if (lhs.host != rhs.host) | 41 if (this->host != rhs.host) |
| 42 return lhs.host < rhs.host; | 42 return this->host < rhs.host; |
| 43 if (lhs.temporary_usage != rhs.temporary_usage) | 43 if (this->temporary_usage != rhs.temporary_usage) |
| 44 return lhs.temporary_usage < rhs.temporary_usage; | 44 return this->temporary_usage < rhs.temporary_usage; |
| 45 return lhs.persistent_usage < rhs.persistent_usage; | 45 return this->persistent_usage < rhs.persistent_usage; |
| 46 } | 46 } |
| 47 | 47 |
| 48 bool operator ==(const BrowsingDataQuotaHelper::QuotaInfo& lhs, | 48 bool BrowsingDataQuotaHelper::QuotaInfo::operator ==( |
| 49 const BrowsingDataQuotaHelper::QuotaInfo& rhs) { | 49 const BrowsingDataQuotaHelper::QuotaInfo& rhs) const { |
| 50 return lhs.host == rhs.host && | 50 return this->host == rhs.host && |
| 51 lhs.temporary_usage == rhs.temporary_usage && | 51 this->temporary_usage == rhs.temporary_usage && |
| 52 lhs.persistent_usage == rhs.persistent_usage; | 52 this->persistent_usage == rhs.persistent_usage; |
| 53 } | 53 } |
| OLD | NEW |