OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/host_content_settings_map.h" | 5 #include "components/content_settings/core/browser/host_content_settings_map.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 default_provider->AddObserver(this); | 99 default_provider->AddObserver(this); |
100 content_settings_providers_[DEFAULT_PROVIDER] = default_provider; | 100 content_settings_providers_[DEFAULT_PROVIDER] = default_provider; |
101 | 101 |
102 content_settings_providers_[OVERRIDE_PROVIDER] = | 102 content_settings_providers_[OVERRIDE_PROVIDER] = |
103 new content_settings::OverrideProvider(prefs_, is_off_the_record_); | 103 new content_settings::OverrideProvider(prefs_, is_off_the_record_); |
104 } | 104 } |
105 | 105 |
106 // static | 106 // static |
107 void HostContentSettingsMap::RegisterProfilePrefs( | 107 void HostContentSettingsMap::RegisterProfilePrefs( |
108 user_prefs::PrefRegistrySyncable* registry) { | 108 user_prefs::PrefRegistrySyncable* registry) { |
109 registry->RegisterIntegerPref( | 109 registry->RegisterIntegerPref(prefs::kContentSettingsWindowLastTabIndex, 0); |
110 prefs::kContentSettingsWindowLastTabIndex, | |
111 0, | |
112 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | |
113 | 110 |
114 // Register the prefs for the content settings providers. | 111 // Register the prefs for the content settings providers. |
115 content_settings::DefaultProvider::RegisterProfilePrefs(registry); | 112 content_settings::DefaultProvider::RegisterProfilePrefs(registry); |
116 content_settings::PrefProvider::RegisterProfilePrefs(registry); | 113 content_settings::PrefProvider::RegisterProfilePrefs(registry); |
117 content_settings::PolicyProvider::RegisterProfilePrefs(registry); | 114 content_settings::PolicyProvider::RegisterProfilePrefs(registry); |
118 content_settings::OverrideProvider::RegisterProfilePrefs(registry); | 115 content_settings::OverrideProvider::RegisterProfilePrefs(registry); |
119 } | 116 } |
120 | 117 |
121 void HostContentSettingsMap::RegisterProvider( | 118 void HostContentSettingsMap::RegisterProvider( |
122 ProviderType type, | 119 ProviderType type, |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 } | 769 } |
773 } | 770 } |
774 | 771 |
775 if (info) { | 772 if (info) { |
776 info->source = content_settings::SETTING_SOURCE_NONE; | 773 info->source = content_settings::SETTING_SOURCE_NONE; |
777 info->primary_pattern = ContentSettingsPattern(); | 774 info->primary_pattern = ContentSettingsPattern(); |
778 info->secondary_pattern = ContentSettingsPattern(); | 775 info->secondary_pattern = ContentSettingsPattern(); |
779 } | 776 } |
780 return scoped_ptr<base::Value>(); | 777 return scoped_ptr<base::Value>(); |
781 } | 778 } |
OLD | NEW |