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