Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Unified Diff: components/content_settings/core/browser/content_settings_registry.h

Issue 1318083005: Remove HostContentSettingsMap::ContentTypeHasCompoundValue function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-num-types-enum-3
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/content_settings/core/browser/content_settings_registry.h
diff --git a/components/content_settings/core/browser/content_settings_registry.h b/components/content_settings/core/browser/content_settings_registry.h
index 71bc415c7ba1d29491ce4baeb5a11d6e9c97033f..f3f6a8ef2a13743236774e7f8b5fbf7373ea557c 100644
--- a/components/content_settings/core/browser/content_settings_registry.h
+++ b/components/content_settings/core/browser/content_settings_registry.h
@@ -12,6 +12,7 @@
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "components/content_settings/core/browser/content_settings_info.h"
+#include "components/content_settings/core/browser/content_settings_utils.h"
#include "components/content_settings/core/browser/website_settings_info.h"
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings_types.h"
@@ -26,6 +27,11 @@ class WebsiteSettingsRegistry;
// const.
class ContentSettingsRegistry {
public:
+ typedef base::ScopedPtrMap<ContentSettingsType,
Bernhard Bauer 2015/09/23 11:30:37 Prefer `using Map = ...` over typedef.
raymes 2015/09/24 03:07:51 Done.
+ scoped_ptr<ContentSettingsInfo>> Map;
+ typedef MapValueIterator<typename Map::const_iterator,
+ const ContentSettingsInfo*> const_iterator;
+
static ContentSettingsRegistry* GetInstance();
// Reset the instance for use inside tests.
@@ -33,6 +39,9 @@ class ContentSettingsRegistry {
const ContentSettingsInfo* Get(ContentSettingsType type) const;
+ const_iterator begin() const;
+ const_iterator end() const;
+
private:
friend class ContentSettingsRegistryTest;
friend struct base::DefaultLazyInstanceTraits<ContentSettingsRegistry>;
@@ -51,8 +60,7 @@ class ContentSettingsRegistry {
WebsiteSettingsInfo::SyncStatus sync_status,
const std::vector<std::string>& whitelisted_schemes);
- base::ScopedPtrMap<ContentSettingsType, scoped_ptr<ContentSettingsInfo>>
- content_settings_info_;
+ Map content_settings_info_;
WebsiteSettingsRegistry* website_settings_registry_;
DISALLOW_COPY_AND_ASSIGN(ContentSettingsRegistry);

Powered by Google App Engine
This is Rietveld 408576698