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

Side by Side Diff: components/content_settings/core/common/content_settings.h

Issue 1005303003: Split the aggregate dictionary of content settings exceptions into per-type dictionaries (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Memory leak in last test. Created 5 years, 8 months 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 unified diff | Download patch
OLDNEW
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 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_H_ 5 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_H_
6 #define COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_H_ 6 #define COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 16 matching lines...) Expand all
27 27
28 // Range-checked conversion of an int to a ContentSetting, for use when reading 28 // Range-checked conversion of an int to a ContentSetting, for use when reading
29 // prefs off disk. 29 // prefs off disk.
30 ContentSetting IntToContentSetting(int content_setting); 30 ContentSetting IntToContentSetting(int content_setting);
31 31
32 // Converts a given content setting to its histogram value, for use when saving 32 // Converts a given content setting to its histogram value, for use when saving
33 // content settings types to a histogram. 33 // content settings types to a histogram.
34 ContentSettingsTypeHistogram ContentSettingTypeToHistogramValue( 34 ContentSettingsTypeHistogram ContentSettingTypeToHistogramValue(
35 ContentSettingsType content_setting); 35 ContentSettingsType content_setting);
36 36
37 // Whether this content setting should be synced.
38 bool IsContentSettingsTypeSyncable(ContentSettingsType content_setting);
39
37 struct ContentSettingPatternSource { 40 struct ContentSettingPatternSource {
38 ContentSettingPatternSource(const ContentSettingsPattern& primary_pattern, 41 ContentSettingPatternSource(const ContentSettingsPattern& primary_pattern,
39 const ContentSettingsPattern& secondary_patttern, 42 const ContentSettingsPattern& secondary_patttern,
40 ContentSetting setting, 43 ContentSetting setting,
41 const std::string& source, 44 const std::string& source,
42 bool incognito); 45 bool incognito);
43 ContentSettingPatternSource(); 46 ContentSettingPatternSource();
44 ContentSettingsPattern primary_pattern; 47 ContentSettingsPattern primary_pattern;
45 ContentSettingsPattern secondary_pattern; 48 ContentSettingsPattern secondary_pattern;
46 ContentSetting setting; 49 ContentSetting setting;
(...skipping 30 matching lines...) Expand all
77 // contains the patterns of the appling rule. 80 // contains the patterns of the appling rule.
78 struct SettingInfo { 81 struct SettingInfo {
79 SettingSource source; 82 SettingSource source;
80 ContentSettingsPattern primary_pattern; 83 ContentSettingsPattern primary_pattern;
81 ContentSettingsPattern secondary_pattern; 84 ContentSettingsPattern secondary_pattern;
82 }; 85 };
83 86
84 } // namespace content_settings 87 } // namespace content_settings
85 88
86 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_H_ 89 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698