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

Side by Side Diff: base/prefs/pref_registry_simple.cc

Issue 1544033003: Switch to standard integer types in base/prefs/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « base/prefs/pref_registry_simple.h ('k') | base/prefs/pref_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/prefs/pref_registry_simple.h" 5 #include "base/prefs/pref_registry_simple.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 NO_REGISTRATION_FLAGS); 59 NO_REGISTRATION_FLAGS);
60 } 60 }
61 61
62 void PrefRegistrySimple::RegisterDictionaryPref( 62 void PrefRegistrySimple::RegisterDictionaryPref(
63 const std::string& path, 63 const std::string& path,
64 base::DictionaryValue* default_value) { 64 base::DictionaryValue* default_value) {
65 RegisterPrefAndNotify(path, default_value, NO_REGISTRATION_FLAGS); 65 RegisterPrefAndNotify(path, default_value, NO_REGISTRATION_FLAGS);
66 } 66 }
67 67
68 void PrefRegistrySimple::RegisterInt64Pref(const std::string& path, 68 void PrefRegistrySimple::RegisterInt64Pref(const std::string& path,
69 int64 default_value) { 69 int64_t default_value) {
70 RegisterPrefAndNotify( 70 RegisterPrefAndNotify(
71 path, new base::StringValue(base::Int64ToString(default_value)), 71 path, new base::StringValue(base::Int64ToString(default_value)),
72 NO_REGISTRATION_FLAGS); 72 NO_REGISTRATION_FLAGS);
73 } 73 }
74 74
75 void PrefRegistrySimple::RegisterUint64Pref(const std::string& path, 75 void PrefRegistrySimple::RegisterUint64Pref(const std::string& path,
76 uint64 default_value) { 76 uint64_t default_value) {
77 RegisterPrefAndNotify( 77 RegisterPrefAndNotify(
78 path, new base::StringValue(base::Uint64ToString(default_value)), 78 path, new base::StringValue(base::Uint64ToString(default_value)),
79 NO_REGISTRATION_FLAGS); 79 NO_REGISTRATION_FLAGS);
80 } 80 }
81 81
82 void PrefRegistrySimple::RegisterBooleanPref(const std::string& path, 82 void PrefRegistrySimple::RegisterBooleanPref(const std::string& path,
83 bool default_value, 83 bool default_value,
84 uint32 flags) { 84 uint32_t flags) {
85 RegisterPrefAndNotify(path, new base::FundamentalValue(default_value), flags); 85 RegisterPrefAndNotify(path, new base::FundamentalValue(default_value), flags);
86 } 86 }
87 87
88 void PrefRegistrySimple::RegisterIntegerPref(const std::string& path, 88 void PrefRegistrySimple::RegisterIntegerPref(const std::string& path,
89 int default_value, 89 int default_value,
90 uint32 flags) { 90 uint32_t flags) {
91 RegisterPrefAndNotify(path, new base::FundamentalValue(default_value), flags); 91 RegisterPrefAndNotify(path, new base::FundamentalValue(default_value), flags);
92 } 92 }
93 93
94 void PrefRegistrySimple::RegisterDoublePref(const std::string& path, 94 void PrefRegistrySimple::RegisterDoublePref(const std::string& path,
95 double default_value, 95 double default_value,
96 uint32 flags) { 96 uint32_t flags) {
97 RegisterPrefAndNotify(path, new base::FundamentalValue(default_value), flags); 97 RegisterPrefAndNotify(path, new base::FundamentalValue(default_value), flags);
98 } 98 }
99 99
100 void PrefRegistrySimple::RegisterStringPref(const std::string& path, 100 void PrefRegistrySimple::RegisterStringPref(const std::string& path,
101 const std::string& default_value, 101 const std::string& default_value,
102 uint32 flags) { 102 uint32_t flags) {
103 RegisterPrefAndNotify(path, new base::StringValue(default_value), flags); 103 RegisterPrefAndNotify(path, new base::StringValue(default_value), flags);
104 } 104 }
105 105
106 void PrefRegistrySimple::RegisterFilePathPref( 106 void PrefRegistrySimple::RegisterFilePathPref(
107 const std::string& path, 107 const std::string& path,
108 const base::FilePath& default_value, 108 const base::FilePath& default_value,
109 uint32 flags) { 109 uint32_t flags) {
110 RegisterPrefAndNotify(path, new base::StringValue(default_value.value()), 110 RegisterPrefAndNotify(path, new base::StringValue(default_value.value()),
111 flags); 111 flags);
112 } 112 }
113 113
114 void PrefRegistrySimple::RegisterListPref(const std::string& path, 114 void PrefRegistrySimple::RegisterListPref(const std::string& path,
115 uint32 flags) { 115 uint32_t flags) {
116 RegisterPrefAndNotify(path, new base::ListValue(), flags); 116 RegisterPrefAndNotify(path, new base::ListValue(), flags);
117 } 117 }
118 118
119 void PrefRegistrySimple::RegisterListPref(const std::string& path, 119 void PrefRegistrySimple::RegisterListPref(const std::string& path,
120 base::ListValue* default_value, 120 base::ListValue* default_value,
121 uint32 flags) { 121 uint32_t flags) {
122 RegisterPrefAndNotify(path, default_value, flags); 122 RegisterPrefAndNotify(path, default_value, flags);
123 } 123 }
124 124
125 void PrefRegistrySimple::RegisterDictionaryPref(const std::string& path, 125 void PrefRegistrySimple::RegisterDictionaryPref(const std::string& path,
126 uint32 flags) { 126 uint32_t flags) {
127 RegisterPrefAndNotify(path, new base::DictionaryValue(), flags); 127 RegisterPrefAndNotify(path, new base::DictionaryValue(), flags);
128 } 128 }
129 129
130 void PrefRegistrySimple::RegisterDictionaryPref( 130 void PrefRegistrySimple::RegisterDictionaryPref(
131 const std::string& path, 131 const std::string& path,
132 base::DictionaryValue* default_value, 132 base::DictionaryValue* default_value,
133 uint32 flags) { 133 uint32_t flags) {
134 RegisterPrefAndNotify(path, default_value, flags); 134 RegisterPrefAndNotify(path, default_value, flags);
135 } 135 }
136 136
137 void PrefRegistrySimple::RegisterInt64Pref(const std::string& path, 137 void PrefRegistrySimple::RegisterInt64Pref(const std::string& path,
138 int64 default_value, 138 int64_t default_value,
139 uint32 flags) { 139 uint32_t flags) {
140 RegisterPrefAndNotify( 140 RegisterPrefAndNotify(
141 path, new base::StringValue(base::Int64ToString(default_value)), flags); 141 path, new base::StringValue(base::Int64ToString(default_value)), flags);
142 } 142 }
143 143
144 void PrefRegistrySimple::RegisterUint64Pref(const std::string& path, 144 void PrefRegistrySimple::RegisterUint64Pref(const std::string& path,
145 uint64 default_value, 145 uint64_t default_value,
146 uint32 flags) { 146 uint32_t flags) {
147 RegisterPrefAndNotify( 147 RegisterPrefAndNotify(
148 path, new base::StringValue(base::Uint64ToString(default_value)), flags); 148 path, new base::StringValue(base::Uint64ToString(default_value)), flags);
149 } 149 }
150 150
151 void PrefRegistrySimple::OnPrefRegistered(const std::string& path, 151 void PrefRegistrySimple::OnPrefRegistered(const std::string& path,
152 base::Value* default_value, 152 base::Value* default_value,
153 uint32 flags) { 153 uint32_t flags) {}
154 }
155 154
156 void PrefRegistrySimple::RegisterPrefAndNotify(const std::string& path, 155 void PrefRegistrySimple::RegisterPrefAndNotify(const std::string& path,
157 base::Value* default_value, 156 base::Value* default_value,
158 uint32 flags) { 157 uint32_t flags) {
159 RegisterPreference(path, default_value, flags); 158 RegisterPreference(path, default_value, flags);
160 OnPrefRegistered(path, default_value, flags); 159 OnPrefRegistered(path, default_value, flags);
161 } 160 }
OLDNEW
« no previous file with comments | « base/prefs/pref_registry_simple.h ('k') | base/prefs/pref_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698