| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 const char Profile::kProfileKey[] = "__PROFILE__"; | 72 const char Profile::kProfileKey[] = "__PROFILE__"; |
| 73 // This must be a string which can never be a valid domain. | 73 // This must be a string which can never be a valid domain. |
| 74 const char Profile::kNoHostedDomainFound[] = "NO_HOSTED_DOMAIN"; | 74 const char Profile::kNoHostedDomainFound[] = "NO_HOSTED_DOMAIN"; |
| 75 | 75 |
| 76 // static | 76 // static |
| 77 void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 77 void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
| 78 registry->RegisterBooleanPref( | 78 registry->RegisterBooleanPref( |
| 79 prefs::kSearchSuggestEnabled, | 79 prefs::kSearchSuggestEnabled, |
| 80 true, | 80 true, |
| 81 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 81 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 82 #if defined(OS_ANDROID) | 82 #if BUILDFLAG(ANDROID_JAVA_UI) |
| 83 registry->RegisterStringPref( | 83 registry->RegisterStringPref( |
| 84 prefs::kContextualSearchEnabled, | 84 prefs::kContextualSearchEnabled, |
| 85 std::string(), | 85 std::string(), |
| 86 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 86 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 87 #endif | 87 #endif |
| 88 registry->RegisterBooleanPref(prefs::kSessionExitedCleanly, true); | 88 registry->RegisterBooleanPref(prefs::kSessionExitedCleanly, true); |
| 89 registry->RegisterStringPref(prefs::kSessionExitType, std::string()); | 89 registry->RegisterStringPref(prefs::kSessionExitType, std::string()); |
| 90 registry->RegisterBooleanPref( | 90 registry->RegisterBooleanPref( |
| 91 prefs::kSafeBrowsingEnabled, | 91 prefs::kSafeBrowsingEnabled, |
| 92 true, | 92 true, |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 if (a->IsSameProfile(b)) | 207 if (a->IsSameProfile(b)) |
| 208 return false; | 208 return false; |
| 209 return a->GetOriginalProfile() < b->GetOriginalProfile(); | 209 return a->GetOriginalProfile() < b->GetOriginalProfile(); |
| 210 } | 210 } |
| 211 | 211 |
| 212 double Profile::GetDefaultZoomLevelForProfile() { | 212 double Profile::GetDefaultZoomLevelForProfile() { |
| 213 return GetDefaultStoragePartition(this) | 213 return GetDefaultStoragePartition(this) |
| 214 ->GetHostZoomMap() | 214 ->GetHostZoomMap() |
| 215 ->GetDefaultZoomLevel(); | 215 ->GetDefaultZoomLevel(); |
| 216 } | 216 } |
| OLD | NEW |