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

Unified Diff: components/content_settings/core/browser/website_settings_info.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, 4 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_info.h
diff --git a/components/content_settings/core/browser/website_settings_info.h b/components/content_settings/core/browser/website_settings_info.h
index 435b9df0666c902a89462d4673b9eef91cae638f..cdbe329a72b20eca947bd3817ec124f839780631 100644
--- a/components/content_settings/core/browser/website_settings_info.h
+++ b/components/content_settings/core/browser/website_settings_info.h
@@ -8,24 +8,43 @@
#include <string>
#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
#include "components/content_settings/core/common/content_settings_types.h"
+namespace base {
+class Value;
+} // namespace base
+
namespace content_settings {
// This class stores the properties related to a website setting.
// TODO(raymes): Move more properties into this class.
class WebsiteSettingsInfo {
public:
- WebsiteSettingsInfo(ContentSettingsType type, const std::string& name);
+ WebsiteSettingsInfo(ContentSettingsType type,
+ const std::string& name,
+ scoped_ptr<base::Value> initial_default_value);
~WebsiteSettingsInfo();
ContentSettingsType type() const { return type_; }
const std::string& name() const { return name_; }
+ const std::string& pref_name() const { return pref_name_; }
+ const std::string& default_value_pref_name() const {
+ return default_value_pref_name_;
+ }
+ const base::Value* initial_default_value() const {
+ return initial_default_value_.get();
+ }
+
private:
const ContentSettingsType type_;
const std::string name_;
+ const std::string pref_name_;
+ const std::string default_value_pref_name_;
+ const scoped_ptr<base::Value> initial_default_value_;
+
DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsInfo);
};

Powered by Google App Engine
This is Rietveld 408576698