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

Side by Side Diff: components/content_settings/core/browser/content_settings_default_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, 8 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_default_prov ider.h" 5 #include "components/content_settings/core/browser/content_settings_default_prov ider.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 // Whether the deprecated dictionary preference has already been migrated 133 // Whether the deprecated dictionary preference has already been migrated
134 // into the individual preferences in this profile. 134 // into the individual preferences in this profile.
135 registry->RegisterBooleanPref( 135 registry->RegisterBooleanPref(
136 prefs::kMigratedDefaultContentSettings, 136 prefs::kMigratedDefaultContentSettings,
137 false, 137 false,
138 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 138 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
139 139
140 // Whether the deprecated mediastream default setting has already been 140 // Whether the deprecated mediastream default setting has already been
141 // migrated into microphone and camera default settings. 141 // migrated into microphone and camera default settings.
142 registry->RegisterBooleanPref( 142 registry->RegisterBooleanPref(prefs::kMigratedDefaultMediaStreamSetting,
143 prefs::kMigratedDefaultMediaStreamSetting, 143 false);
144 false,
145 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
146 } 144 }
147 145
148 DefaultProvider::DefaultProvider(PrefService* prefs, bool incognito) 146 DefaultProvider::DefaultProvider(PrefService* prefs, bool incognito)
149 : prefs_(prefs), 147 : prefs_(prefs),
150 is_incognito_(incognito), 148 is_incognito_(incognito),
151 updating_preferences_(false) { 149 updating_preferences_(false) {
152 DCHECK(prefs_); 150 DCHECK(prefs_);
153 151
154 // Migrate the dictionary of default content settings to the new individual 152 // Migrate the dictionary of default content settings to the new individual
155 // preferences. 153 // preferences.
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 scoped_ptr<base::Value> value = ReadIndividualPref( 545 scoped_ptr<base::Value> value = ReadIndividualPref(
548 CONTENT_SETTINGS_TYPE_MEDIASTREAM); 546 CONTENT_SETTINGS_TYPE_MEDIASTREAM);
549 WriteIndividualPref(CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC, value.get()); 547 WriteIndividualPref(CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC, value.get());
550 WriteIndividualPref(CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, value.get()); 548 WriteIndividualPref(CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, value.get());
551 WriteIndividualPref(CONTENT_SETTINGS_TYPE_MEDIASTREAM, NULL); 549 WriteIndividualPref(CONTENT_SETTINGS_TYPE_MEDIASTREAM, NULL);
552 550
553 prefs_->SetBoolean(prefs::kMigratedDefaultMediaStreamSetting, true); 551 prefs_->SetBoolean(prefs::kMigratedDefaultMediaStreamSetting, true);
554 } 552 }
555 553
556 } // namespace content_settings 554 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698