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

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

Issue 2812113004: Write last_modified date to Content Settings in the PrefProvider (Closed)
Patch Set: Fix Android compilation Created 3 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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/time/time.h"
13 #include "components/content_settings/core/common/content_settings_pattern.h" 14 #include "components/content_settings/core/common/content_settings_pattern.h"
14 #include "components/content_settings/core/common/content_settings_types.h" 15 #include "components/content_settings/core/common/content_settings_types.h"
15 16
16 // Different settings that can be assigned for a particular content type. We 17 // Different settings that can be assigned for a particular content type. We
17 // give the user the ability to set these on a global and per-origin basis. 18 // give the user the ability to set these on a global and per-origin basis.
18 // A Java counterpart will be generated for this enum. 19 // A Java counterpart will be generated for this enum.
19 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.preferences.website 20 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.preferences.website
20 // GENERATED_JAVA_CLASS_NAME_OVERRIDE: ContentSettingValues 21 // GENERATED_JAVA_CLASS_NAME_OVERRIDE: ContentSettingValues
21 // 22 //
22 // TODO(nigeltao): migrate the Java users of this enum to the mojom-generated 23 // TODO(nigeltao): migrate the Java users of this enum to the mojom-generated
(...skipping 14 matching lines...) Expand all
37 38
38 // Converts a given content setting to its histogram value, for use when saving 39 // Converts a given content setting to its histogram value, for use when saving
39 // content settings types to a histogram. 40 // content settings types to a histogram.
40 int ContentSettingTypeToHistogramValue(ContentSettingsType content_setting, 41 int ContentSettingTypeToHistogramValue(ContentSettingsType content_setting,
41 size_t* num_values); 42 size_t* num_values);
42 43
43 struct ContentSettingPatternSource { 44 struct ContentSettingPatternSource {
44 ContentSettingPatternSource(const ContentSettingsPattern& primary_pattern, 45 ContentSettingPatternSource(const ContentSettingsPattern& primary_pattern,
45 const ContentSettingsPattern& secondary_patttern, 46 const ContentSettingsPattern& secondary_patttern,
46 ContentSetting setting, 47 ContentSetting setting,
48 base::Time last_modified,
47 const std::string& source, 49 const std::string& source,
48 bool incognito); 50 bool incognito);
49 ContentSettingPatternSource(const ContentSettingPatternSource& other); 51 ContentSettingPatternSource(const ContentSettingPatternSource& other);
50 ContentSettingPatternSource(); 52 ContentSettingPatternSource();
51 ContentSettingsPattern primary_pattern; 53 ContentSettingsPattern primary_pattern;
52 ContentSettingsPattern secondary_pattern; 54 ContentSettingsPattern secondary_pattern;
53 ContentSetting setting; 55 ContentSetting setting;
56 base::Time last_modified;
54 std::string source; 57 std::string source;
55 bool incognito; 58 bool incognito;
56 }; 59 };
57 60
58 typedef std::vector<ContentSettingPatternSource> ContentSettingsForOneType; 61 typedef std::vector<ContentSettingPatternSource> ContentSettingsForOneType;
59 62
60 struct RendererContentSettingRules { 63 struct RendererContentSettingRules {
61 RendererContentSettingRules(); 64 RendererContentSettingRules();
62 ~RendererContentSettingRules(); 65 ~RendererContentSettingRules();
63 ContentSettingsForOneType image_rules; 66 ContentSettingsForOneType image_rules;
(...skipping 23 matching lines...) Expand all
87 // contains the patterns of the appling rule. 90 // contains the patterns of the appling rule.
88 struct SettingInfo { 91 struct SettingInfo {
89 SettingSource source; 92 SettingSource source;
90 ContentSettingsPattern primary_pattern; 93 ContentSettingsPattern primary_pattern;
91 ContentSettingsPattern secondary_pattern; 94 ContentSettingsPattern secondary_pattern;
92 }; 95 };
93 96
94 } // namespace content_settings 97 } // namespace content_settings
95 98
96 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_H_ 99 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698