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

Unified Diff: components/content_settings/core/browser/website_settings_registry.h

Issue 1252073002: Move pref names and default value into WebsiteSettingsInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@website-settings-registry-simple
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: components/content_settings/core/browser/website_settings_registry.h
diff --git a/components/content_settings/core/browser/website_settings_registry.h b/components/content_settings/core/browser/website_settings_registry.h
index 8d10a3d820f064e646dc277dbaf5836a9b3b01a5..ebc6841f351e13c46cca6d8afd09f399217ea4a8 100644
--- a/components/content_settings/core/browser/website_settings_registry.h
+++ b/components/content_settings/core/browser/website_settings_registry.h
@@ -11,6 +11,7 @@
#include "base/macros.h"
#include "base/memory/scoped_vector.h"
#include "components/content_settings/core/browser/website_settings_info.h"
+#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings_types.h"
namespace content_settings {
@@ -27,17 +28,25 @@ class WebsiteSettingsRegistry {
const WebsiteSettingsInfo* GetByName(const std::string& name) const;
private:
+ friend class WebsiteSettingsRegistryTest;
+ friend struct base::DefaultLazyInstanceTraits<WebsiteSettingsRegistry>;
+
WebsiteSettingsRegistry();
~WebsiteSettingsRegistry();
// Register a new WebsiteSettingsInfo.
void Register(ContentSettingsType type, const std::string& name);
+ // Register a new WebsiteSettingsInfo for a permission-like setting.
msramek 2015/07/29 09:20:07 In our past discussions, we used the word "permiss
Bernhard Bauer 2015/07/29 10:12:39 In the past, we've used the term "compound" for co
raymes 2015/07/30 05:25:03 I've named them RegisterWebsiteSetting and Registe
msramek 2015/07/31 15:27:49 That's the terminology from this document, right?
+ void RegisterPermission(ContentSettingsType type,
+ const std::string& name,
+ ContentSetting initial_default_value);
+
+ // Helper used by Register/RegisterPermission.
+ void StoreWebsiteSettingsInfo(WebsiteSettingsInfo* info);
ScopedVector<WebsiteSettingsInfo> website_settings_info_;
DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsRegistry);
- friend class WebsiteSettingsRegistryTest;
- friend struct base::DefaultLazyInstanceTraits<WebsiteSettingsRegistry>;
};
} // namespace content_settings

Powered by Google App Engine
This is Rietveld 408576698