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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_WEBSITE_SETTINGS_INFO_H_
6 #define COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_WEBSITE_SETTINGS_INFO_H_
10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "components/content_settings/core/common/content_settings_types.h"
18 namespace content_settings
{
20 // This class stores the properties related to a website setting.
21 class WebsiteSettingsInfo
{
23 enum SyncStatus
{ SYNCABLE
, UNSYNCABLE
};
25 enum LossyStatus
{ LOSSY
, NOT_LOSSY
};
27 WebsiteSettingsInfo(ContentSettingsType type
,
28 const std::string
& name
,
29 scoped_ptr
<base::Value
> initial_default_value
,
30 SyncStatus sync_status
,
31 LossyStatus lossy_status
);
32 ~WebsiteSettingsInfo();
34 ContentSettingsType
type() const { return type_
; }
35 const std::string
& name() const { return name_
; }
37 const std::string
& pref_name() const { return pref_name_
; }
38 const std::string
& default_value_pref_name() const {
39 return default_value_pref_name_
;
41 const base::Value
* initial_default_value() const {
42 return initial_default_value_
.get();
45 uint32
GetPrefRegistrationFlags() const;
48 const ContentSettingsType type_
;
49 const std::string name_
;
51 const std::string pref_name_
;
52 const std::string default_value_pref_name_
;
53 const scoped_ptr
<base::Value
> initial_default_value_
;
54 const SyncStatus sync_status_
;
55 const LossyStatus lossy_status_
;
57 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsInfo
);
60 } // namespace content_settings
62 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_WEBSITE_SETTINGS_INFO_H_