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

Side by Side Diff: chrome/browser/extensions/extension_content_settings_store.h

Issue 7253041: Use primary/secondary for URLs and patterns everywhere in the content settings extension API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 9 years, 5 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 | Annotate | Revision Log
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 CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTENT_SETTINGS_STORE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTENT_SETTINGS_STORE_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTENT_SETTINGS_STORE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTENT_SETTINGS_STORE_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 // Adds |observer|. This method should only be called on the UI thread. 112 // Adds |observer|. This method should only be called on the UI thread.
113 void AddObserver(Observer* observer); 113 void AddObserver(Observer* observer);
114 114
115 // Remove |observer|. This method should only be called on the UI thread. 115 // Remove |observer|. This method should only be called on the UI thread.
116 void RemoveObserver(Observer* observer); 116 void RemoveObserver(Observer* observer);
117 117
118 private: 118 private:
119 struct ExtensionEntry; 119 struct ExtensionEntry;
120 struct ContentSettingSpec { 120 struct ContentSettingSpec {
121 ContentSettingSpec(const ContentSettingsPattern& pattern, 121 ContentSettingSpec(const ContentSettingsPattern& primary_pattern,
122 const ContentSettingsPattern& embedder_pattern, 122 const ContentSettingsPattern& secondary_pattern,
123 ContentSettingsType type, 123 ContentSettingsType type,
124 const content_settings::ResourceIdentifier& identifier, 124 const content_settings::ResourceIdentifier& identifier,
125 ContentSetting setting); 125 ContentSetting setting);
126 126
127 ContentSettingsPattern embedded_pattern; 127 ContentSettingsPattern primary_pattern;
128 ContentSettingsPattern top_level_pattern; 128 ContentSettingsPattern secondary_pattern;
129 ContentSettingsType content_type; 129 ContentSettingsType content_type;
130 content_settings::ResourceIdentifier resource_identifier; 130 content_settings::ResourceIdentifier resource_identifier;
131 ContentSetting setting; 131 ContentSetting setting;
132 }; 132 };
133 133
134 typedef std::map<std::string, ExtensionEntry*> ExtensionEntryMap; 134 typedef std::map<std::string, ExtensionEntry*> ExtensionEntryMap;
135 135
136 typedef std::list<ContentSettingSpec> ContentSettingSpecList; 136 typedef std::list<ContentSettingSpec> ContentSettingSpecList;
137 137
138 ContentSetting GetContentSettingFromSpecList( 138 ContentSetting GetContentSettingFromSpecList(
(...skipping 28 matching lines...) Expand all
167 ExtensionEntryMap entries_; 167 ExtensionEntryMap entries_;
168 168
169 ObserverList<Observer, false> observers_; 169 ObserverList<Observer, false> observers_;
170 170
171 mutable base::Lock lock_; 171 mutable base::Lock lock_;
172 172
173 DISALLOW_COPY_AND_ASSIGN(ExtensionContentSettingsStore); 173 DISALLOW_COPY_AND_ASSIGN(ExtensionContentSettingsStore);
174 }; 174 };
175 175
176 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTENT_SETTINGS_STORE_H_ 176 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTENT_SETTINGS_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698