Chromium Code Reviews| 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" |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 33 REQUESTING_DOMAIN_ONLY_SCOPE, | 33 REQUESTING_DOMAIN_ONLY_SCOPE, |
| 34 | 34 |
| 35 // Settings scoped to the origin of the requesting frame only. | 35 // Settings scoped to the origin of the requesting frame only. |
| 36 REQUESTING_ORIGIN_ONLY_SCOPE, | 36 REQUESTING_ORIGIN_ONLY_SCOPE, |
| 37 | 37 |
| 38 // Settings scoped to the combination of the origin of the requesting | 38 // Settings scoped to the combination of the origin of the requesting |
| 39 // frame and the origin of the top level frame. | 39 // frame and the origin of the top level frame. |
| 40 REQUESTING_ORIGIN_AND_TOP_LEVEL_ORIGIN_SCOPE | 40 REQUESTING_ORIGIN_AND_TOP_LEVEL_ORIGIN_SCOPE |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 enum IncognitoBehavior { INHERIT_IN_INCOGNITO, | |
| 44 INHERIT_IN_INCOGNITO_EXCEPT_ALLOW }; | |
|
raymes
2015/11/30 00:28:46
Please document each of these
johnme
2015/11/30 14:56:58
Done.
| |
| 45 | |
| 43 WebsiteSettingsInfo(ContentSettingsType type, | 46 WebsiteSettingsInfo(ContentSettingsType type, |
| 44 const std::string& name, | 47 const std::string& name, |
| 45 scoped_ptr<base::Value> initial_default_value, | 48 scoped_ptr<base::Value> initial_default_value, |
| 46 SyncStatus sync_status, | 49 SyncStatus sync_status, |
| 47 LossyStatus lossy_status, | 50 LossyStatus lossy_status, |
| 48 ScopingType scoping_type); | 51 ScopingType scoping_type, |
| 52 IncognitoBehavior incognito_behavior); | |
| 49 ~WebsiteSettingsInfo(); | 53 ~WebsiteSettingsInfo(); |
| 50 | 54 |
| 51 ContentSettingsType type() const { return type_; } | 55 ContentSettingsType type() const { return type_; } |
| 52 const std::string& name() const { return name_; } | 56 const std::string& name() const { return name_; } |
| 53 | 57 |
| 54 const std::string& pref_name() const { return pref_name_; } | 58 const std::string& pref_name() const { return pref_name_; } |
| 55 const std::string& default_value_pref_name() const { | 59 const std::string& default_value_pref_name() const { |
| 56 return default_value_pref_name_; | 60 return default_value_pref_name_; |
| 57 } | 61 } |
| 58 const base::Value* initial_default_value() const { | 62 const base::Value* initial_default_value() const { |
| 59 return initial_default_value_.get(); | 63 return initial_default_value_.get(); |
| 60 } | 64 } |
| 61 | 65 |
| 62 uint32 GetPrefRegistrationFlags() const; | 66 uint32 GetPrefRegistrationFlags() const; |
| 63 | 67 |
| 64 ScopingType scoping_type() const { return scoping_type_; } | 68 ScopingType scoping_type() const { return scoping_type_; } |
| 65 | 69 |
| 70 IncognitoBehavior incognito_behavior() const { return incognito_behavior_; } | |
| 71 | |
| 66 private: | 72 private: |
| 67 const ContentSettingsType type_; | 73 const ContentSettingsType type_; |
| 68 const std::string name_; | 74 const std::string name_; |
| 69 | 75 |
| 70 const std::string pref_name_; | 76 const std::string pref_name_; |
| 71 const std::string default_value_pref_name_; | 77 const std::string default_value_pref_name_; |
| 72 const scoped_ptr<base::Value> initial_default_value_; | 78 const scoped_ptr<base::Value> initial_default_value_; |
| 73 const SyncStatus sync_status_; | 79 const SyncStatus sync_status_; |
| 74 const LossyStatus lossy_status_; | 80 const LossyStatus lossy_status_; |
| 75 const ScopingType scoping_type_; | 81 const ScopingType scoping_type_; |
| 82 const IncognitoBehavior incognito_behavior_; | |
|
raymes
2015/11/30 00:28:46
This isn't really relevant for WebsiteSettings. Ca
johnme
2015/11/30 14:56:58
Done.
| |
| 76 | 83 |
| 77 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsInfo); | 84 DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsInfo); |
| 78 }; | 85 }; |
| 79 | 86 |
| 80 } // namespace content_settings | 87 } // namespace content_settings |
| 81 | 88 |
| 82 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_WEBSITE_SETTINGS_INFO_H_ | 89 #endif // COMPONENTS_CONTENT_SETTINGS_CORE_BROWSER_WEBSITE_SETTINGS_INFO_H_ |
| OLD | NEW |