Vectorize website settings icons in omnibox
[chromium-blink-merge.git] / components / content_settings / core / browser / website_settings_info.h
blobe947ba69572fdfd10f4b4650dc2460a1a6ef10b1
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_
8 #include <string>
10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "components/content_settings/core/common/content_settings_types.h"
14 namespace base {
15 class Value;
16 } // namespace base
18 namespace content_settings {
20 // This class stores the properties related to a website setting.
21 // TODO(raymes): Move more properties into this class.
22 class WebsiteSettingsInfo {
23 public:
24 enum SyncStatus { SYNCABLE, UNSYNCABLE };
26 enum LossyStatus { LOSSY, NOT_LOSSY };
28 WebsiteSettingsInfo(ContentSettingsType type,
29 const std::string& name,
30 scoped_ptr<base::Value> initial_default_value,
31 SyncStatus sync_status,
32 LossyStatus lossy_status);
33 ~WebsiteSettingsInfo();
35 ContentSettingsType type() const { return type_; }
36 const std::string& name() const { return name_; }
38 const std::string& pref_name() const { return pref_name_; }
39 const std::string& default_value_pref_name() const {
40 return default_value_pref_name_;
42 const base::Value* initial_default_value() const {
43 return initial_default_value_.get();
46 uint32 GetPrefRegistrationFlags() const;
48 private:
49 const ContentSettingsType type_;
50 const std::string name_;
52 const std::string pref_name_;
53 const std::string default_value_pref_name_;
54 const scoped_ptr<base::Value> initial_default_value_;
55 const SyncStatus sync_status_;
56 const LossyStatus lossy_status_;
58 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsInfo);
61 } // namespace content_settings
63 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_WEBSITE_SETTINGS_INFO_H_