| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 // static | 58 // static |
| 59 const char Profile::kProfileKey[] = "__PROFILE__"; | 59 const char Profile::kProfileKey[] = "__PROFILE__"; |
| 60 | 60 |
| 61 // static | 61 // static |
| 62 void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 62 void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
| 63 registry->RegisterBooleanPref( | 63 registry->RegisterBooleanPref( |
| 64 prefs::kSearchSuggestEnabled, | 64 prefs::kSearchSuggestEnabled, |
| 65 true, | 65 true, |
| 66 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 66 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 67 #if defined(OS_ANDROID) | 67 #if defined(OS_ANDROID) |
| 68 registry->RegisterIntegerPref( | 68 registry->RegisterStringPref( |
| 69 prefs::kContextualSearchEnabled, | 69 prefs::kContextualSearchEnabled, |
| 70 0, | 70 std::string(), |
| 71 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 71 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 72 #endif | 72 #endif |
| 73 registry->RegisterBooleanPref( | 73 registry->RegisterBooleanPref( |
| 74 prefs::kSessionExitedCleanly, | 74 prefs::kSessionExitedCleanly, |
| 75 true, | 75 true, |
| 76 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 76 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 77 registry->RegisterStringPref( | 77 registry->RegisterStringPref( |
| 78 prefs::kSessionExitType, | 78 prefs::kSessionExitType, |
| 79 std::string(), | 79 std::string(), |
| 80 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 80 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 | 210 |
| 211 void Profile::MaybeSendDestroyedNotification() { | 211 void Profile::MaybeSendDestroyedNotification() { |
| 212 if (!sent_destroyed_notification_) { | 212 if (!sent_destroyed_notification_) { |
| 213 sent_destroyed_notification_ = true; | 213 sent_destroyed_notification_ = true; |
| 214 content::NotificationService::current()->Notify( | 214 content::NotificationService::current()->Notify( |
| 215 chrome::NOTIFICATION_PROFILE_DESTROYED, | 215 chrome::NOTIFICATION_PROFILE_DESTROYED, |
| 216 content::Source<Profile>(this), | 216 content::Source<Profile>(this), |
| 217 content::NotificationService::NoDetails()); | 217 content::NotificationService::NoDetails()); |
| 218 } | 218 } |
| 219 } | 219 } |
| OLD | NEW |