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

Unified Diff: chrome/browser/extensions/api/content_settings/content_settings_store.h

Issue 10381097: Move content settings extension API to content_settings dir. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed conflict Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/content_settings/content_settings_store.h
diff --git a/chrome/browser/extensions/extension_content_settings_store.h b/chrome/browser/extensions/api/content_settings/content_settings_store.h
similarity index 87%
rename from chrome/browser/extensions/extension_content_settings_store.h
rename to chrome/browser/extensions/api/content_settings/content_settings_store.h
index 4b918ff6a29d0dbcc904cd4451beebe45a4af7b3..2e018836f2f47a7a18b7ca2ed3ed58627c2127c2 100644
--- a/chrome/browser/extensions/extension_content_settings_store.h
+++ b/chrome/browser/extensions/api/content_settings/content_settings_store.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTENT_SETTINGS_STORE_H_
-#define CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTENT_SETTINGS_STORE_H_
+#ifndef CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_STORE_H_
+#define CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_STORE_H_
#include <map>
#include <string>
@@ -28,25 +28,27 @@ class OriginIdentifierValueMap;
class RuleIterator;
}
+namespace extensions {
+
// This class is the backend for extension-defined content settings. It is used
// by the content_settings::ExtensionProvider to integrate its settings into the
// HostContentSettingsMap and by the content settings extension API to provide
// extensions with access to content settings.
-class ExtensionContentSettingsStore
- : public base::RefCountedThreadSafe<ExtensionContentSettingsStore> {
+class ContentSettingsStore
+ : public base::RefCountedThreadSafe<ContentSettingsStore> {
public:
class Observer {
public:
virtual ~Observer() {}
// Called when a content setting changes in the
- // ExtensionContentSettingsStore.
+ // ContentSettingsStore.
virtual void OnContentSettingChanged(
const std::string& extension_id,
bool incognito) = 0;
};
- ExtensionContentSettingsStore();
+ ContentSettingsStore();
// //////////////////////////////////////////////////////////////////////////
@@ -81,7 +83,7 @@ class ExtensionContentSettingsStore
// Deserializes content settings rules from |list| and applies them as set by
// the extension with ID |extension_id|.
- void SetExtensionContentSettingsFromList(const std::string& extension_id,
+ void SetExtensionContentSettingFromList(const std::string& extension_id,
const base::ListValue* list,
ExtensionPrefsScope scope);
@@ -106,13 +108,13 @@ class ExtensionContentSettingsStore
void RemoveObserver(Observer* observer);
private:
- friend class base::RefCountedThreadSafe<ExtensionContentSettingsStore>;
+ friend class base::RefCountedThreadSafe<ContentSettingsStore>;
struct ExtensionEntry;
typedef std::multimap<base::Time, ExtensionEntry*> ExtensionEntryMap;
- virtual ~ExtensionContentSettingsStore();
+ virtual ~ContentSettingsStore();
content_settings::OriginIdentifierValueMap* GetValueMap(
const std::string& ext_id,
@@ -136,7 +138,9 @@ class ExtensionContentSettingsStore
mutable base::Lock lock_;
- DISALLOW_COPY_AND_ASSIGN(ExtensionContentSettingsStore);
+ DISALLOW_COPY_AND_ASSIGN(ContentSettingsStore);
};
-#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTENT_SETTINGS_STORE_H_
+} // namespace extensions
+
+#endif // CHROME_BROWSER_EXTENSIONS_API_CONTENT_SETTINGS_CONTENT_SETTINGS_STORE_H_

Powered by Google App Engine
This is Rietveld 408576698