Chromium Code Reviews| 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..20d42e3543fb637acb20017ce92d53b909129291 100644 |
| --- a/components/content_settings/core/browser/website_settings_info.h |
| +++ b/components/content_settings/core/browser/website_settings_info.h |
| @@ -8,24 +8,44 @@ |
| #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); |
| + // Ownership of |initial_default_value| remains with the caller. |
| + WebsiteSettingsInfo(ContentSettingsType type, |
| + const std::string& name, |
| + const base::Value* initial_default_value); |
|
Bernhard Bauer
2015/07/30 08:13:00
You could also pass this in as a scoped_ptr, if yo
raymes
2015/08/03 03:18:17
Let me know if I've done what you were thinking :)
Bernhard Bauer
2015/08/03 07:33:52
Yup, exactly.
|
| ~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); |
| }; |