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

Side by Side Diff: chrome/browser/prefs/pref_service.cc

Issue 6240013: Make proxy settings one atomic dictionary in the PrefStores such that modifications are atomic. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/out/Debug
Patch Set: Created 9 years, 10 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/prefs/pref_service.h" 5 #include "chrome/browser/prefs/pref_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 233
234 void PrefService::RegisterFilePathPref(const char* path, 234 void PrefService::RegisterFilePathPref(const char* path,
235 const FilePath& default_value) { 235 const FilePath& default_value) {
236 RegisterPreference(path, Value::CreateStringValue(default_value.value())); 236 RegisterPreference(path, Value::CreateStringValue(default_value.value()));
237 } 237 }
238 238
239 void PrefService::RegisterListPref(const char* path) { 239 void PrefService::RegisterListPref(const char* path) {
240 RegisterPreference(path, new ListValue()); 240 RegisterPreference(path, new ListValue());
241 } 241 }
242 242
243 void PrefService::RegisterListPref(const char* path, ListValue* default_value) {
244 RegisterPreference(path, default_value);
245 }
246
243 void PrefService::RegisterDictionaryPref(const char* path) { 247 void PrefService::RegisterDictionaryPref(const char* path) {
244 RegisterPreference(path, new DictionaryValue()); 248 RegisterPreference(path, new DictionaryValue());
245 } 249 }
246 250
251 void PrefService::RegisterDictionaryPref(const char* path,
252 DictionaryValue* default_value) {
253 RegisterPreference(path, default_value);
254 }
255
247 void PrefService::RegisterLocalizedBooleanPref(const char* path, 256 void PrefService::RegisterLocalizedBooleanPref(const char* path,
248 int locale_default_message_id) { 257 int locale_default_message_id) {
249 RegisterPreference( 258 RegisterPreference(
250 path, 259 path,
251 CreateLocaleDefaultValue(Value::TYPE_BOOLEAN, locale_default_message_id)); 260 CreateLocaleDefaultValue(Value::TYPE_BOOLEAN, locale_default_message_id));
252 } 261 }
253 262
254 void PrefService::RegisterLocalizedIntegerPref(const char* path, 263 void PrefService::RegisterLocalizedIntegerPref(const char* path,
255 int locale_default_message_id) { 264 int locale_default_message_id) {
256 RegisterPreference( 265 RegisterPreference(
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 668
660 bool PrefService::Preference::IsDefaultValue() const { 669 bool PrefService::Preference::IsDefaultValue() const {
661 return pref_service_->pref_value_store_-> 670 return pref_service_->pref_value_store_->
662 PrefValueFromDefaultStore(name_.c_str()); 671 PrefValueFromDefaultStore(name_.c_str());
663 } 672 }
664 673
665 bool PrefService::Preference::IsUserModifiable() const { 674 bool PrefService::Preference::IsUserModifiable() const {
666 return pref_service_->pref_value_store_-> 675 return pref_service_->pref_value_store_->
667 PrefValueUserModifiable(name_.c_str()); 676 PrefValueUserModifiable(name_.c_str());
668 } 677 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698