| 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/content_settings/content_settings_provider.h" | 5 #include "chrome/browser/content_settings/content_settings_provider.h" |
| 6 | 6 |
| 7 namespace content_settings { | 7 namespace content_settings { |
| 8 | 8 |
| 9 ProviderInterface::Rule::Rule() | 9 ProviderInterface::Rule::Rule() |
| 10 : content_setting(CONTENT_SETTING_DEFAULT) { | 10 : content_setting(CONTENT_SETTING_DEFAULT) { |
| 11 } | 11 } |
| 12 | 12 |
| 13 ProviderInterface::Rule::Rule(const ContentSettingsPattern& primary_pattern, | 13 ProviderInterface::Rule::Rule(const ContentSettingsPattern& primary_pattern, |
| 14 const ContentSettingsPattern& secondary_pattern, | 14 const ContentSettingsPattern& secondary_pattern, |
| 15 ContentSetting setting) | 15 ContentSetting setting) |
| 16 : primary_pattern(primary_pattern), | 16 : primary_pattern(primary_pattern), |
| 17 secondary_pattern(secondary_pattern), | 17 secondary_pattern(secondary_pattern), |
| 18 content_setting(setting) { | 18 content_setting(setting) { |
| 19 } | 19 } |
| 20 | 20 |
| 21 bool ProviderInterface::Rule::operator<(const Rule& rhs) const { |
| 22 if (primary_pattern < rhs.primary_pattern) |
| 23 return true; |
| 24 if (rhs.primary_pattern < primary_pattern) |
| 25 return false; |
| 26 return (secondary_pattern < rhs.secondary_pattern); |
| 27 } |
| 28 |
| 21 } // namespace content_settings | 29 } // namespace content_settings |
| OLD | NEW |