| 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 "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/prefs/pref_registry_simple.h" | 8 #include "base/prefs/pref_registry_simple.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 void RegisterPrefs(PrefRegistrySimple* registry) { | 47 void RegisterPrefs(PrefRegistrySimple* registry) { |
| 48 // Preferences about global profile information. | 48 // Preferences about global profile information. |
| 49 registry->RegisterStringPref(prefs::kProfileLastUsed, std::string()); | 49 registry->RegisterStringPref(prefs::kProfileLastUsed, std::string()); |
| 50 registry->RegisterIntegerPref(prefs::kProfilesNumCreated, 1); | 50 registry->RegisterIntegerPref(prefs::kProfilesNumCreated, 1); |
| 51 registry->RegisterListPref(prefs::kProfilesLastActive); | 51 registry->RegisterListPref(prefs::kProfilesLastActive); |
| 52 | 52 |
| 53 // Preferences about the user manager. | 53 // Preferences about the user manager. |
| 54 registry->RegisterBooleanPref(prefs::kBrowserGuestModeEnabled, true); | 54 registry->RegisterBooleanPref(prefs::kBrowserGuestModeEnabled, true); |
| 55 registry->RegisterBooleanPref(prefs::kBrowserAddPersonEnabled, true); | 55 registry->RegisterBooleanPref(prefs::kBrowserAddPersonEnabled, true); |
| 56 |
| 57 registry->RegisterBooleanPref( |
| 58 prefs::kProfileAvatarRightClickTutorialDismissed, false); |
| 56 } | 59 } |
| 57 | 60 |
| 58 base::string16 GetAvatarNameForProfile(const base::FilePath& profile_path) { | 61 base::string16 GetAvatarNameForProfile(const base::FilePath& profile_path) { |
| 59 base::string16 display_name; | 62 base::string16 display_name; |
| 60 | 63 |
| 61 if (profile_path == ProfileManager::GetGuestProfilePath()) { | 64 if (profile_path == ProfileManager::GetGuestProfilePath()) { |
| 62 display_name = l10n_util::GetStringUTF16(IDS_GUEST_PROFILE_NAME); | 65 display_name = l10n_util::GetStringUTF16(IDS_GUEST_PROFILE_NAME); |
| 63 } else { | 66 } else { |
| 64 const ProfileInfoCache& cache = | 67 const ProfileInfoCache& cache = |
| 65 g_browser_process->profile_manager()->GetProfileInfoCache(); | 68 g_browser_process->profile_manager()->GetProfileInfoCache(); |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 // For guest the browsing data is in the OTR profile. | 234 // For guest the browsing data is in the OTR profile. |
| 232 if (profile->IsGuestSession()) | 235 if (profile->IsGuestSession()) |
| 233 profile = profile->GetOffTheRecordProfile(); | 236 profile = profile->GetOffTheRecordProfile(); |
| 234 | 237 |
| 235 BrowsingDataRemover::CreateForUnboundedRange(profile)->Remove( | 238 BrowsingDataRemover::CreateForUnboundedRange(profile)->Remove( |
| 236 BrowsingDataRemover::REMOVE_ALL, BrowsingDataHelper::ALL); | 239 BrowsingDataRemover::REMOVE_ALL, BrowsingDataHelper::ALL); |
| 237 // BrowsingDataRemover deletes itself. | 240 // BrowsingDataRemover deletes itself. |
| 238 } | 241 } |
| 239 | 242 |
| 240 } // namespace profiles | 243 } // namespace profiles |
| OLD | NEW |