Index: components/content_settings/core/browser/content_settings_origin_identifier_value_map.cc |
diff --git a/components/content_settings/core/browser/content_settings_origin_identifier_value_map.cc b/components/content_settings/core/browser/content_settings_origin_identifier_value_map.cc |
index d51e624dcacd77770fffbfe3642e18c55dd7e22c..0c3ab90c6d50eea6f645def974c08e78126dd524 100644 |
--- a/components/content_settings/core/browser/content_settings_origin_identifier_value_map.cc |
+++ b/components/content_settings/core/browser/content_settings_origin_identifier_value_map.cc |
@@ -3,6 +3,8 @@ |
// found in the LICENSE file. |
#include "components/content_settings/core/browser/content_settings_origin_identifier_value_map.h" |
+ |
+#include <tuple> |
#include "base/compiler_specific.h" |
#include "base/logging.h" |
@@ -61,9 +63,8 @@ |
bool OriginIdentifierValueMap::EntryMapKey::operator<( |
const OriginIdentifierValueMap::EntryMapKey& other) const { |
- if (content_type != other.content_type) |
- return content_type < other.content_type; |
- return (resource_identifier < other.resource_identifier); |
+ return std::tie(content_type, resource_identifier) < |
+ std::tie(other.content_type, other.resource_identifier); |
} |
OriginIdentifierValueMap::PatternPair::PatternPair( |
@@ -78,11 +79,8 @@ |
// Note that this operator is the other way around than |
// |ContentSettingsPattern::operator<|. It sorts patterns with higher |
// precedence first. |
- if (primary_pattern > other.primary_pattern) |
- return true; |
- else if (other.primary_pattern > primary_pattern) |
- return false; |
- return (secondary_pattern > other.secondary_pattern); |
+ return std::tie(primary_pattern, secondary_pattern) > |
+ std::tie(other.primary_pattern, other.secondary_pattern); |
} |
RuleIterator* OriginIdentifierValueMap::GetRuleIterator( |