| 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 "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 #endif | 159 #endif |
| 160 #if defined(OS_ANDROID) || defined(OS_IOS) | 160 #if defined(OS_ANDROID) || defined(OS_IOS) |
| 161 registry->RegisterBooleanPref( | 161 registry->RegisterBooleanPref( |
| 162 prefs::kSpdyProxyAuthEnabled, | 162 prefs::kSpdyProxyAuthEnabled, |
| 163 false, | 163 false, |
| 164 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 164 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 165 registry->RegisterBooleanPref( | 165 registry->RegisterBooleanPref( |
| 166 prefs::kSpdyProxyAuthWasEnabledBefore, | 166 prefs::kSpdyProxyAuthWasEnabledBefore, |
| 167 false, | 167 false, |
| 168 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 168 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 169 | |
| 170 #endif // defined(OS_ANDROID) || defined(OS_IOS) | 169 #endif // defined(OS_ANDROID) || defined(OS_IOS) |
| 170 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) |
| 171 // Preferences related to the avatar bubble and user manager tutorials. |
| 172 registry->RegisterIntegerPref( |
| 173 prefs::kProfileAvatarTutorialShown, |
| 174 0, |
| 175 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 176 registry->RegisterBooleanPref( |
| 177 prefs::kProfileUserManagerTutorialShown, |
| 178 false, |
| 179 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 180 #endif |
| 171 } | 181 } |
| 172 | 182 |
| 173 | |
| 174 std::string Profile::GetDebugName() { | 183 std::string Profile::GetDebugName() { |
| 175 std::string name = GetPath().BaseName().MaybeAsASCII(); | 184 std::string name = GetPath().BaseName().MaybeAsASCII(); |
| 176 if (name.empty()) { | 185 if (name.empty()) { |
| 177 name = "UnknownProfile"; | 186 name = "UnknownProfile"; |
| 178 } | 187 } |
| 179 return name; | 188 return name; |
| 180 } | 189 } |
| 181 | 190 |
| 182 bool Profile::IsGuestSession() const { | 191 bool Profile::IsGuestSession() const { |
| 183 #if defined(OS_CHROMEOS) | 192 #if defined(OS_CHROMEOS) |
| (...skipping 26 matching lines...) Expand all Loading... |
| 210 | 219 |
| 211 void Profile::MaybeSendDestroyedNotification() { | 220 void Profile::MaybeSendDestroyedNotification() { |
| 212 if (!sent_destroyed_notification_) { | 221 if (!sent_destroyed_notification_) { |
| 213 sent_destroyed_notification_ = true; | 222 sent_destroyed_notification_ = true; |
| 214 content::NotificationService::current()->Notify( | 223 content::NotificationService::current()->Notify( |
| 215 chrome::NOTIFICATION_PROFILE_DESTROYED, | 224 chrome::NOTIFICATION_PROFILE_DESTROYED, |
| 216 content::Source<Profile>(this), | 225 content::Source<Profile>(this), |
| 217 content::NotificationService::NoDetails()); | 226 content::NotificationService::NoDetails()); |
| 218 } | 227 } |
| 219 } | 228 } |
| OLD | NEW |