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 "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 168 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
169 #endif // defined(GOOGLE_CHROME_BUILD) | 169 #endif // defined(GOOGLE_CHROME_BUILD) |
170 registry->RegisterBooleanPref( | 170 registry->RegisterBooleanPref( |
171 prefs::kMediaRouterFirstRunFlowAcknowledged, | 171 prefs::kMediaRouterFirstRunFlowAcknowledged, |
172 false, | 172 false, |
173 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 173 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
174 #endif | 174 #endif |
175 | 175 |
176 #if defined(OS_CHROMEOS) | 176 #if defined(OS_CHROMEOS) |
177 registry->RegisterBooleanPref(prefs::kAllowScreenLock, true); | 177 registry->RegisterBooleanPref(prefs::kAllowScreenLock, true); |
| 178 |
| 179 // Preferences related the lock screen pin unlock. |
| 180 registry->RegisterIntegerPref(prefs::kPinUnlockMinimumLength, 4); |
| 181 // 0 indicates no maximum length for the pin. |
| 182 registry->RegisterIntegerPref(prefs::kPinUnlockMaximumLength, 0); |
| 183 registry->RegisterBooleanPref(prefs::kPinUnlockAllowWeakPins, true); |
178 #endif | 184 #endif |
179 } | 185 } |
180 | 186 |
181 std::string Profile::GetDebugName() { | 187 std::string Profile::GetDebugName() { |
182 std::string name = GetPath().BaseName().MaybeAsASCII(); | 188 std::string name = GetPath().BaseName().MaybeAsASCII(); |
183 if (name.empty()) { | 189 if (name.empty()) { |
184 name = "UnknownProfile"; | 190 name = "UnknownProfile"; |
185 } | 191 } |
186 return name; | 192 return name; |
187 } | 193 } |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 if (a->IsSameProfile(b)) | 245 if (a->IsSameProfile(b)) |
240 return false; | 246 return false; |
241 return a->GetOriginalProfile() < b->GetOriginalProfile(); | 247 return a->GetOriginalProfile() < b->GetOriginalProfile(); |
242 } | 248 } |
243 | 249 |
244 double Profile::GetDefaultZoomLevelForProfile() { | 250 double Profile::GetDefaultZoomLevelForProfile() { |
245 return GetDefaultStoragePartition(this) | 251 return GetDefaultStoragePartition(this) |
246 ->GetHostZoomMap() | 252 ->GetHostZoomMap() |
247 ->GetDefaultZoomLevel(); | 253 ->GetDefaultZoomLevel(); |
248 } | 254 } |
OLD | NEW |