| 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 "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 const char Profile::kProfileKey[] = "__PROFILE__"; | 74 const char Profile::kProfileKey[] = "__PROFILE__"; |
| 75 // This must be a string which can never be a valid domain. | 75 // This must be a string which can never be a valid domain. |
| 76 const char Profile::kNoHostedDomainFound[] = "NO_HOSTED_DOMAIN"; | 76 const char Profile::kNoHostedDomainFound[] = "NO_HOSTED_DOMAIN"; |
| 77 | 77 |
| 78 // static | 78 // static |
| 79 void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 79 void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
| 80 registry->RegisterBooleanPref( | 80 registry->RegisterBooleanPref( |
| 81 prefs::kSearchSuggestEnabled, | 81 prefs::kSearchSuggestEnabled, |
| 82 true, | 82 true, |
| 83 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 83 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 84 #if BUILDFLAG(ANDROID_JAVA_UI) | 84 #if defined(OS_ANDROID) |
| 85 registry->RegisterStringPref( | 85 registry->RegisterStringPref( |
| 86 prefs::kContextualSearchEnabled, | 86 prefs::kContextualSearchEnabled, |
| 87 std::string(), | 87 std::string(), |
| 88 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 88 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 89 #endif | 89 #endif // defined(OS_ANDROID) |
| 90 registry->RegisterBooleanPref(prefs::kSessionExitedCleanly, true); | 90 registry->RegisterBooleanPref(prefs::kSessionExitedCleanly, true); |
| 91 registry->RegisterStringPref(prefs::kSessionExitType, std::string()); | 91 registry->RegisterStringPref(prefs::kSessionExitType, std::string()); |
| 92 registry->RegisterInt64Pref(prefs::kSiteEngagementLastUpdateTime, 0, | 92 registry->RegisterInt64Pref(prefs::kSiteEngagementLastUpdateTime, 0, |
| 93 PrefRegistry::LOSSY_PREF); | 93 PrefRegistry::LOSSY_PREF); |
| 94 registry->RegisterBooleanPref( | 94 registry->RegisterBooleanPref( |
| 95 prefs::kSafeBrowsingEnabled, | 95 prefs::kSafeBrowsingEnabled, |
| 96 true, | 96 true, |
| 97 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 97 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 98 registry->RegisterBooleanPref(prefs::kSafeBrowsingExtendedReportingEnabled, | 98 registry->RegisterBooleanPref(prefs::kSafeBrowsingExtendedReportingEnabled, |
| 99 false); | 99 false); |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 if (a->IsSameProfile(b)) | 239 if (a->IsSameProfile(b)) |
| 240 return false; | 240 return false; |
| 241 return a->GetOriginalProfile() < b->GetOriginalProfile(); | 241 return a->GetOriginalProfile() < b->GetOriginalProfile(); |
| 242 } | 242 } |
| 243 | 243 |
| 244 double Profile::GetDefaultZoomLevelForProfile() { | 244 double Profile::GetDefaultZoomLevelForProfile() { |
| 245 return GetDefaultStoragePartition(this) | 245 return GetDefaultStoragePartition(this) |
| 246 ->GetHostZoomMap() | 246 ->GetHostZoomMap() |
| 247 ->GetDefaultZoomLevel(); | 247 ->GetDefaultZoomLevel(); |
| 248 } | 248 } |
| OLD | NEW |