OLD | NEW |
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 "chrome/browser/profiles/profile.h" | 5 #include "chrome/browser/profiles/profile.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 "install", | 148 "install", |
149 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 149 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
150 registry->RegisterBooleanPref( | 150 registry->RegisterBooleanPref( |
151 prefs::kSpeechRecognitionFilterProfanities, | 151 prefs::kSpeechRecognitionFilterProfanities, |
152 true, | 152 true, |
153 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 153 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
154 registry->RegisterIntegerPref( | 154 registry->RegisterIntegerPref( |
155 prefs::kProfileIconVersion, | 155 prefs::kProfileIconVersion, |
156 0, | 156 0, |
157 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 157 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 158 registry->RegisterBooleanPref( |
| 159 prefs::kProfileIsLockable, |
| 160 false, |
| 161 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 162 registry->RegisterIntegerPref( |
| 163 prefs::kProfileIsLockableVersion, |
| 164 0, |
| 165 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
158 #if defined(OS_CHROMEOS) | 166 #if defined(OS_CHROMEOS) |
159 // TODO(dilmah): For OS_CHROMEOS we maintain kApplicationLocale in both | 167 // TODO(dilmah): For OS_CHROMEOS we maintain kApplicationLocale in both |
160 // local state and user's profile. For other platforms we maintain | 168 // local state and user's profile. For other platforms we maintain |
161 // kApplicationLocale only in local state. | 169 // kApplicationLocale only in local state. |
162 // In the future we may want to maintain kApplicationLocale | 170 // In the future we may want to maintain kApplicationLocale |
163 // in user's profile for other platforms as well. | 171 // in user's profile for other platforms as well. |
164 registry->RegisterStringPref( | 172 registry->RegisterStringPref( |
165 prefs::kApplicationLocale, | 173 prefs::kApplicationLocale, |
166 std::string(), | 174 std::string(), |
167 user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF); | 175 user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 content::NotificationService::NoDetails()); | 251 content::NotificationService::NoDetails()); |
244 } | 252 } |
245 } | 253 } |
246 | 254 |
247 bool ProfileCompare::operator()(Profile* a, Profile* b) const { | 255 bool ProfileCompare::operator()(Profile* a, Profile* b) const { |
248 DCHECK(a && b); | 256 DCHECK(a && b); |
249 if (a->IsSameProfile(b)) | 257 if (a->IsSameProfile(b)) |
250 return false; | 258 return false; |
251 return a->GetOriginalProfile() < b->GetOriginalProfile(); | 259 return a->GetOriginalProfile() < b->GetOriginalProfile(); |
252 } | 260 } |
OLD | NEW |