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

Side by Side Diff: components/content_settings/core/browser/content_settings_pref_provider.cc

Issue 1102733002: Remove most occurences of PrefRegistrySyncable::UNSYNCABLE_PREF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs-add-reg-funcs
Patch Set: Created 5 years, 7 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
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 "components/content_settings/core/browser/content_settings_pref_provide r.h" 5 #include "components/content_settings/core/browser/content_settings_pref_provide r.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 // //////////////////////////////////////////////////////////////////////////// 106 // ////////////////////////////////////////////////////////////////////////////
107 // PrefProvider: 107 // PrefProvider:
108 // 108 //
109 109
110 // static 110 // static
111 void PrefProvider::RegisterProfilePrefs( 111 void PrefProvider::RegisterProfilePrefs(
112 user_prefs::PrefRegistrySyncable* registry) { 112 user_prefs::PrefRegistrySyncable* registry) {
113 registry->RegisterIntegerPref( 113 registry->RegisterIntegerPref(
114 prefs::kContentSettingsVersion, 114 prefs::kContentSettingsVersion,
115 ContentSettingsPattern::kContentSettingsPatternVersion, 115 ContentSettingsPattern::kContentSettingsPatternVersion);
116 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
117 registry->RegisterDictionaryPref( 116 registry->RegisterDictionaryPref(
118 prefs::kContentSettingsPatternPairs, 117 prefs::kContentSettingsPatternPairs,
119 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 118 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
120 registry->RegisterBooleanPref( 119 registry->RegisterBooleanPref(prefs::kMigratedContentSettingsPatternPairs,
121 prefs::kMigratedContentSettingsPatternPairs, 120 false);
122 false,
123 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
124 121
125 for (int i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i) { 122 for (int i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i) {
126 registry->RegisterDictionaryPref( 123 registry->RegisterDictionaryPref(
127 kContentSettingsExceptionsPrefs[i], 124 kContentSettingsExceptionsPrefs[i],
128 IsContentSettingsTypeSyncable(ContentSettingsType(i)) 125 IsContentSettingsTypeSyncable(ContentSettingsType(i))
129 ? user_prefs::PrefRegistrySyncable::SYNCABLE_PREF 126 ? user_prefs::PrefRegistrySyncable::SYNCABLE_PREF
130 : user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF 127 : user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF
131 ); 128 );
132 } 129 }
133 } 130 }
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 bool PrefProvider::TestAllLocks() const { 524 bool PrefProvider::TestAllLocks() const {
528 for (size_t i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i) { 525 for (size_t i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i) {
529 if (!content_settings_prefs_[i]->lock_.Try()) 526 if (!content_settings_prefs_[i]->lock_.Try())
530 return false; 527 return false;
531 content_settings_prefs_[i]->lock_.Release(); 528 content_settings_prefs_[i]->lock_.Release();
532 } 529 }
533 return true; 530 return true;
534 } 531 }
535 532
536 } // namespace content_settings 533 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698