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" |
11 #include "chrome/browser/chrome_notification_types.h" | 11 #include "chrome/browser/chrome_notification_types.h" |
12 #include "chrome/browser/first_run/first_run.h" | 12 #include "chrome/browser/first_run/first_run.h" |
13 #include "chrome/browser/profiles/profile_manager.h" | 13 #include "chrome/browser/profiles/profile_manager.h" |
14 #include "chrome/browser/sync/profile_sync_service_factory.h" | 14 #include "chrome/browser/sync/profile_sync_service_factory.h" |
15 #include "chrome/common/features.h" | |
16 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
17 #include "components/browser_sync/browser/profile_sync_service.h" | 16 #include "components/browser_sync/browser/profile_sync_service.h" |
18 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref
s.h" | 17 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref
s.h" |
19 #include "components/pref_registry/pref_registry_syncable.h" | 18 #include "components/pref_registry/pref_registry_syncable.h" |
20 #include "components/sync_driver/sync_prefs.h" | 19 #include "components/sync_driver/sync_prefs.h" |
21 #include "content/public/browser/host_zoom_map.h" | 20 #include "content/public/browser/host_zoom_map.h" |
22 #include "content/public/browser/notification_service.h" | 21 #include "content/public/browser/notification_service.h" |
23 #include "content/public/browser/notification_source.h" | 22 #include "content/public/browser/notification_source.h" |
24 #include "content/public/browser/storage_partition.h" | 23 #include "content/public/browser/storage_partition.h" |
25 #include "content/public/browser/web_contents.h" | 24 #include "content/public/browser/web_contents.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 true, | 91 true, |
93 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 92 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
94 registry->RegisterBooleanPref(prefs::kSafeBrowsingExtendedReportingEnabled, | 93 registry->RegisterBooleanPref(prefs::kSafeBrowsingExtendedReportingEnabled, |
95 false); | 94 false); |
96 registry->RegisterBooleanPref(prefs::kSafeBrowsingProceedAnywayDisabled, | 95 registry->RegisterBooleanPref(prefs::kSafeBrowsingProceedAnywayDisabled, |
97 false); | 96 false); |
98 registry->RegisterBooleanPref(prefs::kSSLErrorOverrideAllowed, true); | 97 registry->RegisterBooleanPref(prefs::kSSLErrorOverrideAllowed, true); |
99 registry->RegisterDictionaryPref(prefs::kSafeBrowsingIncidentsSent); | 98 registry->RegisterDictionaryPref(prefs::kSafeBrowsingIncidentsSent); |
100 registry->RegisterBooleanPref( | 99 registry->RegisterBooleanPref( |
101 prefs::kSafeBrowsingExtendedReportingOptInAllowed, true); | 100 prefs::kSafeBrowsingExtendedReportingOptInAllowed, true); |
102 #if BUILDFLAG(ENABLE_GOOGLE_NOW) | 101 #if defined(ENABLE_GOOGLE_NOW) |
103 registry->RegisterBooleanPref(prefs::kGoogleGeolocationAccessEnabled, false); | 102 registry->RegisterBooleanPref(prefs::kGoogleGeolocationAccessEnabled, false); |
104 #endif | 103 #endif |
105 // This pref is intentionally outside the above #if. That flag corresponds | 104 // This pref is intentionally outside the above #if. That flag corresponds |
106 // to the Notifier extension and does not gate the launcher page. | 105 // to the Notifier extension and does not gate the launcher page. |
107 // 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. |
108 registry->RegisterBooleanPref(prefs::kGoogleNowLauncherEnabled, true); | 107 registry->RegisterBooleanPref(prefs::kGoogleNowLauncherEnabled, true); |
109 registry->RegisterBooleanPref(prefs::kDisableExtensions, false); | 108 registry->RegisterBooleanPref(prefs::kDisableExtensions, false); |
110 #if defined(ENABLE_EXTENSIONS) | 109 #if defined(ENABLE_EXTENSIONS) |
111 registry->RegisterBooleanPref(extensions::pref_names::kAlertsInitialized, | 110 registry->RegisterBooleanPref(extensions::pref_names::kAlertsInitialized, |
112 false); | 111 false); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 if (a->IsSameProfile(b)) | 206 if (a->IsSameProfile(b)) |
208 return false; | 207 return false; |
209 return a->GetOriginalProfile() < b->GetOriginalProfile(); | 208 return a->GetOriginalProfile() < b->GetOriginalProfile(); |
210 } | 209 } |
211 | 210 |
212 double Profile::GetDefaultZoomLevelForProfile() { | 211 double Profile::GetDefaultZoomLevelForProfile() { |
213 return GetDefaultStoragePartition(this) | 212 return GetDefaultStoragePartition(this) |
214 ->GetHostZoomMap() | 213 ->GetHostZoomMap() |
215 ->GetDefaultZoomLevel(); | 214 ->GetDefaultZoomLevel(); |
216 } | 215 } |
OLD | NEW |