| Index: chrome/browser/content_settings/content_settings_provider.cc
|
| diff --git a/chrome/browser/content_settings/content_settings_provider.cc b/chrome/browser/content_settings/content_settings_provider.cc
|
| index 282c79885c22b29261ce63889714ef2993510914..c792f31ced054152bc5887553a52c591d586271b 100644
|
| --- a/chrome/browser/content_settings/content_settings_provider.cc
|
| +++ b/chrome/browser/content_settings/content_settings_provider.cc
|
| @@ -18,4 +18,26 @@ ProviderInterface::Rule::Rule(const ContentSettingsPattern& primary_pattern,
|
| content_setting(setting) {
|
| }
|
|
|
| +// static
|
| +bool ProviderInterface::Rule::LexicographicalSort(
|
| + const ProviderInterface::Rule& a,
|
| + const ProviderInterface::Rule& b) {
|
| + if (a.primary_pattern.ToString() < b.primary_pattern.ToString())
|
| + return true;
|
| + if (b.primary_pattern.ToString() < a.primary_pattern.ToString())
|
| + return false;
|
| + return (a.secondary_pattern.ToString() < b.secondary_pattern.ToString());
|
| +}
|
| +
|
| +// static
|
| +bool ProviderInterface::Rule::PatternPrecedenceSort(
|
| + const ProviderInterface::Rule& a,
|
| + const ProviderInterface::Rule& b) {
|
| + if (a.primary_pattern < b.primary_pattern)
|
| + return true;
|
| + if (b.primary_pattern < a.primary_pattern)
|
| + return false;
|
| + return (a.secondary_pattern < b.secondary_pattern);
|
| +}
|
| +
|
| } // namespace content_settings
|
|
|