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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 // This pref is intentionally outside the above #if. That flag corresponds | 104 // This pref is intentionally outside the above #if. That flag corresponds |
105 // to the Notifier extension and does not gate the launcher page. | 105 // to the Notifier extension and does not gate the launcher page. |
106 // TODO(skare): Remove or rename ENABLE_GOOGLE_NOW: http://crbug.com/459827. | 106 // TODO(skare): Remove or rename ENABLE_GOOGLE_NOW: http://crbug.com/459827. |
107 registry->RegisterBooleanPref(prefs::kGoogleNowLauncherEnabled, true); | 107 registry->RegisterBooleanPref(prefs::kGoogleNowLauncherEnabled, true); |
108 registry->RegisterBooleanPref(prefs::kDisableExtensions, false); | 108 registry->RegisterBooleanPref(prefs::kDisableExtensions, false); |
109 #if defined(ENABLE_EXTENSIONS) | 109 #if defined(ENABLE_EXTENSIONS) |
110 registry->RegisterBooleanPref(extensions::pref_names::kAlertsInitialized, | 110 registry->RegisterBooleanPref(extensions::pref_names::kAlertsInitialized, |
111 false); | 111 false); |
112 #endif | 112 #endif |
113 registry->RegisterStringPref(prefs::kSelectFileLastDirectory, std::string()); | 113 registry->RegisterStringPref(prefs::kSelectFileLastDirectory, std::string()); |
114 // TODO(wjmaclean): remove the following two prefs once migration to per- | |
115 // partition zoom is complete. | |
116 registry->RegisterDoublePref(prefs::kDefaultZoomLevelDeprecated, 0.0); | |
117 registry->RegisterDictionaryPref(prefs::kPerHostZoomLevelsDeprecated); | |
118 | |
119 registry->RegisterDictionaryPref(prefs::kPartitionDefaultZoomLevel); | 114 registry->RegisterDictionaryPref(prefs::kPartitionDefaultZoomLevel); |
120 registry->RegisterDictionaryPref(prefs::kPartitionPerHostZoomLevels); | 115 registry->RegisterDictionaryPref(prefs::kPartitionPerHostZoomLevels); |
121 registry->RegisterStringPref(prefs::kDefaultApps, "install"); | 116 registry->RegisterStringPref(prefs::kDefaultApps, "install"); |
122 registry->RegisterBooleanPref(prefs::kSpeechRecognitionFilterProfanities, | 117 registry->RegisterBooleanPref(prefs::kSpeechRecognitionFilterProfanities, |
123 true); | 118 true); |
124 registry->RegisterIntegerPref(prefs::kProfileIconVersion, 0); | 119 registry->RegisterIntegerPref(prefs::kProfileIconVersion, 0); |
125 #if defined(OS_CHROMEOS) | 120 #if defined(OS_CHROMEOS) |
126 // TODO(dilmah): For OS_CHROMEOS we maintain kApplicationLocale in both | 121 // TODO(dilmah): For OS_CHROMEOS we maintain kApplicationLocale in both |
127 // local state and user's profile. For other platforms we maintain | 122 // local state and user's profile. For other platforms we maintain |
128 // kApplicationLocale only in local state. | 123 // kApplicationLocale only in local state. |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 if (a->IsSameProfile(b)) | 205 if (a->IsSameProfile(b)) |
211 return false; | 206 return false; |
212 return a->GetOriginalProfile() < b->GetOriginalProfile(); | 207 return a->GetOriginalProfile() < b->GetOriginalProfile(); |
213 } | 208 } |
214 | 209 |
215 double Profile::GetDefaultZoomLevelForProfile() { | 210 double Profile::GetDefaultZoomLevelForProfile() { |
216 return GetDefaultStoragePartition(this) | 211 return GetDefaultStoragePartition(this) |
217 ->GetHostZoomMap() | 212 ->GetHostZoomMap() |
218 ->GetDefaultZoomLevel(); | 213 ->GetDefaultZoomLevel(); |
219 } | 214 } |
OLD | NEW |