| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/profiles_state.h" | 5 #include "chrome/browser/profiles/profiles_state.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // Preferences about global profile information. | 59 // Preferences about global profile information. |
| 60 registry->RegisterStringPref(prefs::kProfileLastUsed, std::string()); | 60 registry->RegisterStringPref(prefs::kProfileLastUsed, std::string()); |
| 61 registry->RegisterIntegerPref(prefs::kProfilesNumCreated, 1); | 61 registry->RegisterIntegerPref(prefs::kProfilesNumCreated, 1); |
| 62 registry->RegisterListPref(prefs::kProfilesLastActive); | 62 registry->RegisterListPref(prefs::kProfilesLastActive); |
| 63 registry->RegisterListPref(prefs::kProfilesDeleted); | 63 registry->RegisterListPref(prefs::kProfilesDeleted); |
| 64 | 64 |
| 65 // Preferences about the user manager. | 65 // Preferences about the user manager. |
| 66 registry->RegisterBooleanPref(prefs::kBrowserGuestModeEnabled, true); | 66 registry->RegisterBooleanPref(prefs::kBrowserGuestModeEnabled, true); |
| 67 registry->RegisterBooleanPref(prefs::kBrowserAddPersonEnabled, true); | 67 registry->RegisterBooleanPref(prefs::kBrowserAddPersonEnabled, true); |
| 68 registry->RegisterBooleanPref(prefs::kForceBrowserSignin, false); | 68 registry->RegisterBooleanPref(prefs::kForceBrowserSignin, false); |
| 69 | |
| 70 registry->RegisterBooleanPref( | |
| 71 prefs::kProfileAvatarRightClickTutorialDismissed, false); | |
| 72 } | 69 } |
| 73 | 70 |
| 74 base::string16 GetAvatarNameForProfile(const base::FilePath& profile_path) { | 71 base::string16 GetAvatarNameForProfile(const base::FilePath& profile_path) { |
| 75 base::string16 display_name; | 72 base::string16 display_name; |
| 76 | 73 |
| 77 if (profile_path == ProfileManager::GetGuestProfilePath()) { | 74 if (profile_path == ProfileManager::GetGuestProfilePath()) { |
| 78 display_name = l10n_util::GetStringUTF16(IDS_GUEST_PROFILE_NAME); | 75 display_name = l10n_util::GetStringUTF16(IDS_GUEST_PROFILE_NAME); |
| 79 } else { | 76 } else { |
| 80 ProfileAttributesStorage& storage = | 77 ProfileAttributesStorage& storage = |
| 81 g_browser_process->profile_manager()->GetProfileAttributesStorage(); | 78 g_browser_process->profile_manager()->GetProfileAttributesStorage(); |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 bool IsPublicSession() { | 279 bool IsPublicSession() { |
| 283 #if defined(OS_CHROMEOS) | 280 #if defined(OS_CHROMEOS) |
| 284 if (chromeos::LoginState::IsInitialized()) { | 281 if (chromeos::LoginState::IsInitialized()) { |
| 285 return chromeos::LoginState::Get()->IsPublicSessionUser(); | 282 return chromeos::LoginState::Get()->IsPublicSessionUser(); |
| 286 } | 283 } |
| 287 #endif | 284 #endif |
| 288 return false; | 285 return false; |
| 289 } | 286 } |
| 290 | 287 |
| 291 } // namespace profiles | 288 } // namespace profiles |
| OLD | NEW |