| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_WEBSITE_SETTINGS_INFO_H_ | 5 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_WEBSITE_SETTINGS_INFO_H_ |
| 6 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_WEBSITE_SETTINGS_INFO_H_ | 6 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_WEBSITE_SETTINGS_INFO_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/scoped_ptr.h" |
| 11 #include "components/content_settings/core/common/content_settings_types.h" | 12 #include "components/content_settings/core/common/content_settings_types.h" |
| 12 | 13 |
| 14 namespace base { |
| 15 class Value; |
| 16 } // namespace base |
| 17 |
| 13 namespace content_settings { | 18 namespace content_settings { |
| 14 | 19 |
| 15 // This class stores the properties related to a website setting. | 20 // This class stores the properties related to a website setting. |
| 16 // TODO(raymes): Move more properties into this class. | 21 // TODO(raymes): Move more properties into this class. |
| 17 class WebsiteSettingsInfo { | 22 class WebsiteSettingsInfo { |
| 18 public: | 23 public: |
| 19 WebsiteSettingsInfo(ContentSettingsType type, const std::string& name); | 24 WebsiteSettingsInfo(ContentSettingsType type, |
| 25 const std::string& name, |
| 26 scoped_ptr<base::Value> initial_default_value); |
| 20 ~WebsiteSettingsInfo(); | 27 ~WebsiteSettingsInfo(); |
| 21 | 28 |
| 22 ContentSettingsType type() const { return type_; } | 29 ContentSettingsType type() const { return type_; } |
| 23 const std::string& name() const { return name_; } | 30 const std::string& name() const { return name_; } |
| 24 | 31 |
| 32 const std::string& pref_name() const { return pref_name_; } |
| 33 const std::string& default_value_pref_name() const { |
| 34 return default_value_pref_name_; |
| 35 } |
| 36 const base::Value* initial_default_value() const { |
| 37 return initial_default_value_.get(); |
| 38 } |
| 39 |
| 25 private: | 40 private: |
| 26 const ContentSettingsType type_; | 41 const ContentSettingsType type_; |
| 27 const std::string name_; | 42 const std::string name_; |
| 28 | 43 |
| 44 const std::string pref_name_; |
| 45 const std::string default_value_pref_name_; |
| 46 const scoped_ptr<base::Value> initial_default_value_; |
| 47 |
| 29 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsInfo); | 48 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsInfo); |
| 30 }; | 49 }; |
| 31 | 50 |
| 32 } // namespace content_settings | 51 } // namespace content_settings |
| 33 | 52 |
| 34 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_WEBSITE_SETTINGS_INFO_H_ | 53 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_WEBSITE_SETTINGS_INFO_H_ |
| OLD | NEW |