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

Side by Side Diff: chrome/browser/content_settings/host_content_settings_map.cc

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 7 years, 12 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/browser/content_settings/host_content_settings_map.h" 5 #include "chrome/browser/content_settings/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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 custom_extension_provider; 123 custom_extension_provider;
124 124
125 OnContentSettingChanged(ContentSettingsPattern(), 125 OnContentSettingChanged(ContentSettingsPattern(),
126 ContentSettingsPattern(), 126 ContentSettingsPattern(),
127 CONTENT_SETTINGS_TYPE_DEFAULT, 127 CONTENT_SETTINGS_TYPE_DEFAULT,
128 ""); 128 "");
129 } 129 }
130 #endif 130 #endif
131 131
132 // static 132 // static
133 void HostContentSettingsMap::RegisterUserPrefs(PrefService* prefs) { 133 void HostContentSettingsMap::RegisterUserPrefs(PrefServiceSyncable* prefs) {
134 prefs->RegisterIntegerPref(prefs::kContentSettingsWindowLastTabIndex, 134 prefs->RegisterIntegerPref(prefs::kContentSettingsWindowLastTabIndex,
135 0, 135 0,
136 PrefService::UNSYNCABLE_PREF); 136 PrefServiceSyncable::UNSYNCABLE_PREF);
137 prefs->RegisterIntegerPref(prefs::kContentSettingsDefaultWhitelistVersion, 137 prefs->RegisterIntegerPref(prefs::kContentSettingsDefaultWhitelistVersion,
138 0, PrefService::SYNCABLE_PREF); 138 0, PrefServiceSyncable::SYNCABLE_PREF);
139 prefs->RegisterBooleanPref(prefs::kContentSettingsClearOnExitMigrated, 139 prefs->RegisterBooleanPref(prefs::kContentSettingsClearOnExitMigrated,
140 false, PrefService::SYNCABLE_PREF); 140 false, PrefServiceSyncable::SYNCABLE_PREF);
141 141
142 // Register the prefs for the content settings providers. 142 // Register the prefs for the content settings providers.
143 content_settings::DefaultProvider::RegisterUserPrefs(prefs); 143 content_settings::DefaultProvider::RegisterUserPrefs(prefs);
144 content_settings::PrefProvider::RegisterUserPrefs(prefs); 144 content_settings::PrefProvider::RegisterUserPrefs(prefs);
145 content_settings::PolicyProvider::RegisterUserPrefs(prefs); 145 content_settings::PolicyProvider::RegisterUserPrefs(prefs);
146 } 146 }
147 147
148 ContentSetting HostContentSettingsMap::GetDefaultContentSettingFromProvider( 148 ContentSetting HostContentSettingsMap::GetDefaultContentSettingFromProvider(
149 ContentSettingsType content_type, 149 ContentSettingsType content_type,
150 content_settings::ProviderInterface* provider) const { 150 content_settings::ProviderInterface* provider) const {
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 HostContentSettingsMap::GetProviderTypeFromSource( 580 HostContentSettingsMap::GetProviderTypeFromSource(
581 const std::string& source) { 581 const std::string& source) {
582 for (size_t i = 0; i < arraysize(kProviderNames); ++i) { 582 for (size_t i = 0; i < arraysize(kProviderNames); ++i) {
583 if (source == kProviderNames[i]) 583 if (source == kProviderNames[i])
584 return static_cast<ProviderType>(i); 584 return static_cast<ProviderType>(i);
585 } 585 }
586 586
587 NOTREACHED(); 587 NOTREACHED();
588 return DEFAULT_PROVIDER; 588 return DEFAULT_PROVIDER;
589 } 589 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698