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 "chrome/browser/browsing_data/browsing_data_quota_helper.h" | 5 #include "chrome/browser/browsing_data/browsing_data_quota_helper.h" |
6 | 6 |
7 #include "base/location.h" | 7 #include "base/location.h" |
8 | 8 |
9 BrowsingDataQuotaHelper::QuotaInfo::QuotaInfo() | 9 BrowsingDataQuotaHelper::QuotaInfo::QuotaInfo() |
10 : temporary_usage(0), | 10 : temporary_usage(0), |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 BrowsingDataQuotaHelper::QuotaInfo::~QuotaInfo() {} | 29 BrowsingDataQuotaHelper::QuotaInfo::~QuotaInfo() {} |
30 | 30 |
31 // static | 31 // static |
32 void BrowsingDataQuotaHelperDeleter::Destruct( | 32 void BrowsingDataQuotaHelperDeleter::Destruct( |
33 const BrowsingDataQuotaHelper* helper) { | 33 const BrowsingDataQuotaHelper* helper) { |
34 helper->io_thread_->DeleteSoon(FROM_HERE, helper); | 34 helper->io_thread_->DeleteSoon(FROM_HERE, helper); |
35 } | 35 } |
36 | 36 |
37 BrowsingDataQuotaHelper::BrowsingDataQuotaHelper( | 37 BrowsingDataQuotaHelper::BrowsingDataQuotaHelper( |
38 base::MessageLoopProxy* io_thread) | 38 base::SingleThreadTaskRunner* io_thread) |
39 : io_thread_(io_thread) { | 39 : io_thread_(io_thread) { |
40 } | 40 } |
41 | 41 |
42 BrowsingDataQuotaHelper::~BrowsingDataQuotaHelper() { | 42 BrowsingDataQuotaHelper::~BrowsingDataQuotaHelper() { |
43 } | 43 } |
44 | 44 |
45 bool BrowsingDataQuotaHelper::QuotaInfo::operator <( | 45 bool BrowsingDataQuotaHelper::QuotaInfo::operator <( |
46 const BrowsingDataQuotaHelper::QuotaInfo& rhs) const { | 46 const BrowsingDataQuotaHelper::QuotaInfo& rhs) const { |
47 if (this->host != rhs.host) | 47 if (this->host != rhs.host) |
48 return this->host < rhs.host; | 48 return this->host < rhs.host; |
49 if (this->temporary_usage != rhs.temporary_usage) | 49 if (this->temporary_usage != rhs.temporary_usage) |
50 return this->temporary_usage < rhs.temporary_usage; | 50 return this->temporary_usage < rhs.temporary_usage; |
51 if (this->syncable_usage != rhs.syncable_usage) | 51 if (this->syncable_usage != rhs.syncable_usage) |
52 return this->syncable_usage < rhs.syncable_usage; | 52 return this->syncable_usage < rhs.syncable_usage; |
53 return this->persistent_usage < rhs.persistent_usage; | 53 return this->persistent_usage < rhs.persistent_usage; |
54 } | 54 } |
55 | 55 |
56 bool BrowsingDataQuotaHelper::QuotaInfo::operator ==( | 56 bool BrowsingDataQuotaHelper::QuotaInfo::operator ==( |
57 const BrowsingDataQuotaHelper::QuotaInfo& rhs) const { | 57 const BrowsingDataQuotaHelper::QuotaInfo& rhs) const { |
58 return this->host == rhs.host && | 58 return this->host == rhs.host && |
59 this->temporary_usage == rhs.temporary_usage && | 59 this->temporary_usage == rhs.temporary_usage && |
60 this->persistent_usage == rhs.persistent_usage && | 60 this->persistent_usage == rhs.persistent_usage && |
61 this->syncable_usage == rhs.syncable_usage; | 61 this->syncable_usage == rhs.syncable_usage; |
62 } | 62 } |
OLD | NEW |