| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 // static | 63 // static |
| 64 const char Profile::kProfileKey[] = "__PROFILE__"; | 64 const char Profile::kProfileKey[] = "__PROFILE__"; |
| 65 | 65 |
| 66 // static | 66 // static |
| 67 void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 67 void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
| 68 registry->RegisterBooleanPref( | 68 registry->RegisterBooleanPref( |
| 69 prefs::kSearchSuggestEnabled, | 69 prefs::kSearchSuggestEnabled, |
| 70 true, | 70 true, |
| 71 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 71 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 72 #if defined(OS_ANDROID) | 72 #if defined(OS_ANDROID) |
| 73 registry->RegisterIntegerPref( | 73 registry->RegisterStringPref( |
| 74 prefs::kContextualSearchEnabled, | 74 prefs::kContextualSearchEnabled, |
| 75 0, | 75 std::string(), |
| 76 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 76 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 77 #endif | 77 #endif |
| 78 registry->RegisterBooleanPref( | 78 registry->RegisterBooleanPref( |
| 79 prefs::kSessionExitedCleanly, | 79 prefs::kSessionExitedCleanly, |
| 80 true, | 80 true, |
| 81 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 81 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 82 registry->RegisterStringPref( | 82 registry->RegisterStringPref( |
| 83 prefs::kSessionExitType, | 83 prefs::kSessionExitType, |
| 84 std::string(), | 84 std::string(), |
| 85 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 85 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 content::NotificationService::NoDetails()); | 247 content::NotificationService::NoDetails()); |
| 248 } | 248 } |
| 249 } | 249 } |
| 250 | 250 |
| 251 bool ProfileCompare::operator()(Profile* a, Profile* b) const { | 251 bool ProfileCompare::operator()(Profile* a, Profile* b) const { |
| 252 DCHECK(a && b); | 252 DCHECK(a && b); |
| 253 if (a->IsSameProfile(b)) | 253 if (a->IsSameProfile(b)) |
| 254 return false; | 254 return false; |
| 255 return a->GetOriginalProfile() < b->GetOriginalProfile(); | 255 return a->GetOriginalProfile() < b->GetOriginalProfile(); |
| 256 } | 256 } |
| OLD | NEW |