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 #include "components/content_settings/core/browser/content_settings_registry.h" | 5 #include "components/content_settings/core/browser/content_settings_registry.h" |
6 | 6 |
| 7 #include "base/macros.h" |
7 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
8 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
9 #include "base/values.h" | 10 #include "base/values.h" |
| 11 #include "build/build_config.h" |
10 #include "components/content_settings/core/browser/content_settings_utils.h" | 12 #include "components/content_settings/core/browser/content_settings_utils.h" |
11 #include "components/content_settings/core/browser/website_settings_registry.h" | 13 #include "components/content_settings/core/browser/website_settings_registry.h" |
12 #include "components/content_settings/core/common/content_settings.h" | 14 #include "components/content_settings/core/common/content_settings.h" |
13 | 15 |
14 namespace content_settings { | 16 namespace content_settings { |
15 | 17 |
16 namespace { | 18 namespace { |
17 | 19 |
18 base::LazyInstance<ContentSettingsRegistry> g_instance = | 20 base::LazyInstance<ContentSettingsRegistry> g_instance = |
19 LAZY_INSTANCE_INITIALIZER; | 21 LAZY_INSTANCE_INITIALIZER; |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 website_settings_registry_->Register( | 299 website_settings_registry_->Register( |
298 type, name, default_value.Pass(), sync_status, | 300 type, name, default_value.Pass(), sync_status, |
299 WebsiteSettingsInfo::NOT_LOSSY, scoping_type); | 301 WebsiteSettingsInfo::NOT_LOSSY, scoping_type); |
300 DCHECK(!ContainsKey(content_settings_info_, type)); | 302 DCHECK(!ContainsKey(content_settings_info_, type)); |
301 content_settings_info_[type] = make_scoped_ptr( | 303 content_settings_info_[type] = make_scoped_ptr( |
302 new ContentSettingsInfo(website_settings_info, whitelisted_schemes, | 304 new ContentSettingsInfo(website_settings_info, whitelisted_schemes, |
303 valid_settings, incognito_behavior)); | 305 valid_settings, incognito_behavior)); |
304 } | 306 } |
305 | 307 |
306 } // namespace content_settings | 308 } // namespace content_settings |
OLD | NEW |