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

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: Updated to ToT and addressed Matt's comments in base-CL 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 238
239 void PrefService::RegisterFilePathPref(const char* path, 239 void PrefService::RegisterFilePathPref(const char* path,
240 const FilePath& default_value) { 240 const FilePath& default_value) {
241 RegisterPreference(path, Value::CreateStringValue(default_value.value())); 241 RegisterPreference(path, Value::CreateStringValue(default_value.value()));
242 } 242 }
243 243
244 void PrefService::RegisterListPref(const char* path) { 244 void PrefService::RegisterListPref(const char* path) {
245 RegisterPreference(path, new ListValue()); 245 RegisterPreference(path, new ListValue());
246 } 246 }
247 247
248 void PrefService::RegisterListPref(const char* path, ListValue* default_value) {
249 RegisterPreference(path, default_value);
250 }
251
248 void PrefService::RegisterDictionaryPref(const char* path) { 252 void PrefService::RegisterDictionaryPref(const char* path) {
249 RegisterPreference(path, new DictionaryValue()); 253 RegisterPreference(path, new DictionaryValue());
250 } 254 }
251 255
256 void PrefService::RegisterDictionaryPref(const char* path,
257 DictionaryValue* default_value) {
258 RegisterPreference(path, default_value);
259 }
260
252 void PrefService::RegisterLocalizedBooleanPref(const char* path, 261 void PrefService::RegisterLocalizedBooleanPref(const char* path,
253 int locale_default_message_id) { 262 int locale_default_message_id) {
254 RegisterPreference( 263 RegisterPreference(
255 path, 264 path,
256 CreateLocaleDefaultValue(Value::TYPE_BOOLEAN, locale_default_message_id)); 265 CreateLocaleDefaultValue(Value::TYPE_BOOLEAN, locale_default_message_id));
257 } 266 }
258 267
259 void PrefService::RegisterLocalizedIntegerPref(const char* path, 268 void PrefService::RegisterLocalizedIntegerPref(const char* path,
260 int locale_default_message_id) { 269 int locale_default_message_id) {
261 RegisterPreference( 270 RegisterPreference(
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 684
676 bool PrefService::Preference::IsDefaultValue() const { 685 bool PrefService::Preference::IsDefaultValue() const {
677 return pref_service_->pref_value_store_-> 686 return pref_service_->pref_value_store_->
678 PrefValueFromDefaultStore(name_.c_str()); 687 PrefValueFromDefaultStore(name_.c_str());
679 } 688 }
680 689
681 bool PrefService::Preference::IsUserModifiable() const { 690 bool PrefService::Preference::IsUserModifiable() const {
682 return pref_service_->pref_value_store_-> 691 return pref_service_->pref_value_store_->
683 PrefValueUserModifiable(name_.c_str()); 692 PrefValueUserModifiable(name_.c_str());
684 } 693 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698