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

Side by Side Diff: chrome/browser/profiles/profile.cc

Issue 2374303002: cros: Added a new function to quick unlock api for checking unfinished pins. (Closed)
Patch Set: Fixed patch set 6 errors. Created 4 years, 2 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
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 "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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 164 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
165 #endif // defined(GOOGLE_CHROME_BUILD) 165 #endif // defined(GOOGLE_CHROME_BUILD)
166 registry->RegisterBooleanPref( 166 registry->RegisterBooleanPref(
167 prefs::kMediaRouterFirstRunFlowAcknowledged, 167 prefs::kMediaRouterFirstRunFlowAcknowledged,
168 false, 168 false,
169 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 169 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
170 #endif 170 #endif
171 171
172 #if defined(OS_CHROMEOS) 172 #if defined(OS_CHROMEOS)
173 registry->RegisterBooleanPref(prefs::kAllowScreenLock, true); 173 registry->RegisterBooleanPref(prefs::kAllowScreenLock, true);
174
175 // Preferences related the lock screen pin unlock.
176 registry->RegisterIntegerPref(prefs::kPinUnlockMinimumLength, 4);
177 // 0 indicates no maximum length for the pin.
178 registry->RegisterIntegerPref(prefs::kPinUnlockMaximumLength, 0);
179 registry->RegisterBooleanPref(prefs::kPinUnlockAllowWeakPins, true);
174 #endif 180 #endif
175 } 181 }
176 182
177 std::string Profile::GetDebugName() { 183 std::string Profile::GetDebugName() {
178 std::string name = GetPath().BaseName().MaybeAsASCII(); 184 std::string name = GetPath().BaseName().MaybeAsASCII();
179 if (name.empty()) { 185 if (name.empty()) {
180 name = "UnknownProfile"; 186 name = "UnknownProfile";
181 } 187 }
182 return name; 188 return name;
183 } 189 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 if (a->IsSameProfile(b)) 241 if (a->IsSameProfile(b))
236 return false; 242 return false;
237 return a->GetOriginalProfile() < b->GetOriginalProfile(); 243 return a->GetOriginalProfile() < b->GetOriginalProfile();
238 } 244 }
239 245
240 double Profile::GetDefaultZoomLevelForProfile() { 246 double Profile::GetDefaultZoomLevelForProfile() {
241 return GetDefaultStoragePartition(this) 247 return GetDefaultStoragePartition(this)
242 ->GetHostZoomMap() 248 ->GetHostZoomMap()
243 ->GetDefaultZoomLevel(); 249 ->GetDefaultZoomLevel();
244 } 250 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698