Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: chrome/browser/browsing_data_quota_helper.cc

Issue 8735001: Move the comparators for QuotaInfo into the class. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browsing_data_quota_helper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browsing_data_quota_helper.cc
===================================================================
--- chrome/browser/browsing_data_quota_helper.cc (revision 112007)
+++ chrome/browser/browsing_data_quota_helper.cc (working copy)
@@ -36,18 +36,18 @@
BrowsingDataQuotaHelper::~BrowsingDataQuotaHelper() {
}
-bool operator <(const BrowsingDataQuotaHelper::QuotaInfo& lhs,
- const BrowsingDataQuotaHelper::QuotaInfo& rhs) {
- if (lhs.host != rhs.host)
- return lhs.host < rhs.host;
- if (lhs.temporary_usage != rhs.temporary_usage)
- return lhs.temporary_usage < rhs.temporary_usage;
- return lhs.persistent_usage < rhs.persistent_usage;
+bool BrowsingDataQuotaHelper::QuotaInfo::operator <(
+ const BrowsingDataQuotaHelper::QuotaInfo& rhs) const {
+ if (this->host != rhs.host)
+ return this->host < rhs.host;
+ if (this->temporary_usage != rhs.temporary_usage)
+ return this->temporary_usage < rhs.temporary_usage;
+ return this->persistent_usage < rhs.persistent_usage;
}
-bool operator ==(const BrowsingDataQuotaHelper::QuotaInfo& lhs,
- const BrowsingDataQuotaHelper::QuotaInfo& rhs) {
- return lhs.host == rhs.host &&
- lhs.temporary_usage == rhs.temporary_usage &&
- lhs.persistent_usage == rhs.persistent_usage;
+bool BrowsingDataQuotaHelper::QuotaInfo::operator ==(
+ const BrowsingDataQuotaHelper::QuotaInfo& rhs) const {
+ return this->host == rhs.host &&
+ this->temporary_usage == rhs.temporary_usage &&
+ this->persistent_usage == rhs.persistent_usage;
}
« no previous file with comments | « chrome/browser/browsing_data_quota_helper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698