Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: chrome/browser/profiles/profile.cc

Issue 2418813002: [Reland] Refactoring of SBER preference usage (Closed)
Patch Set: Sync Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "chrome/browser/first_run/first_run.h" 11 #include "chrome/browser/first_run/first_run.h"
12 #include "chrome/browser/profiles/profile_manager.h" 12 #include "chrome/browser/profiles/profile_manager.h"
13 #include "chrome/browser/sync/profile_sync_service_factory.h" 13 #include "chrome/browser/sync/profile_sync_service_factory.h"
14 #include "chrome/common/features.h" 14 #include "chrome/common/features.h"
15 #include "chrome/common/pref_names.h" 15 #include "chrome/common/pref_names.h"
16 #include "components/browser_sync/profile_sync_service.h" 16 #include "components/browser_sync/profile_sync_service.h"
17 #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"
18 #include "components/pref_registry/pref_registry_syncable.h" 18 #include "components/pref_registry/pref_registry_syncable.h"
19 #include "components/prefs/pref_service.h" 19 #include "components/prefs/pref_service.h"
20 #include "components/safe_browsing_db/safe_browsing_prefs.h"
20 #include "components/sync/base/sync_prefs.h" 21 #include "components/sync/base/sync_prefs.h"
21 #include "content/public/browser/host_zoom_map.h" 22 #include "content/public/browser/host_zoom_map.h"
22 #include "content/public/browser/notification_service.h" 23 #include "content/public/browser/notification_service.h"
23 #include "content/public/browser/notification_source.h" 24 #include "content/public/browser/notification_source.h"
24 #include "content/public/browser/storage_partition.h" 25 #include "content/public/browser/storage_partition.h"
25 #include "content/public/browser/web_contents.h" 26 #include "content/public/browser/web_contents.h"
26 #include "content/public/browser/web_ui.h" 27 #include "content/public/browser/web_ui.h"
27 28
28 #if defined(OS_CHROMEOS) 29 #if defined(OS_CHROMEOS)
29 #include "base/command_line.h" 30 #include "base/command_line.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 87 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
87 #endif 88 #endif
88 registry->RegisterBooleanPref(prefs::kSessionExitedCleanly, true); 89 registry->RegisterBooleanPref(prefs::kSessionExitedCleanly, true);
89 registry->RegisterStringPref(prefs::kSessionExitType, std::string()); 90 registry->RegisterStringPref(prefs::kSessionExitType, std::string());
90 registry->RegisterInt64Pref(prefs::kSiteEngagementLastUpdateTime, 0, 91 registry->RegisterInt64Pref(prefs::kSiteEngagementLastUpdateTime, 0,
91 PrefRegistry::LOSSY_PREF); 92 PrefRegistry::LOSSY_PREF);
92 registry->RegisterBooleanPref( 93 registry->RegisterBooleanPref(
93 prefs::kSafeBrowsingEnabled, 94 prefs::kSafeBrowsingEnabled,
94 true, 95 true,
95 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 96 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
96 registry->RegisterBooleanPref(prefs::kSafeBrowsingExtendedReportingEnabled, 97 registry->RegisterBooleanPref(safe_browsing::GetExtendedReportingPrefName(),
97 false); 98 false);
98 registry->RegisterBooleanPref(prefs::kSafeBrowsingProceedAnywayDisabled, 99 registry->RegisterBooleanPref(prefs::kSafeBrowsingProceedAnywayDisabled,
99 false); 100 false);
100 registry->RegisterBooleanPref(prefs::kSSLErrorOverrideAllowed, true); 101 registry->RegisterBooleanPref(prefs::kSSLErrorOverrideAllowed, true);
101 registry->RegisterDictionaryPref(prefs::kSafeBrowsingIncidentsSent); 102 registry->RegisterDictionaryPref(prefs::kSafeBrowsingIncidentsSent);
102 registry->RegisterBooleanPref( 103 registry->RegisterBooleanPref(
103 prefs::kSafeBrowsingExtendedReportingOptInAllowed, true); 104 prefs::kSafeBrowsingExtendedReportingOptInAllowed, true);
104 // This pref is intentionally outside the above #if. That flag corresponds 105 // This pref is intentionally outside the above #if. That flag corresponds
105 // to the Notifier extension and does not gate the launcher page. 106 // to the Notifier extension and does not gate the launcher page.
106 // TODO(skare): Remove or rename ENABLE_GOOGLE_NOW: http://crbug.com/459827. 107 // TODO(skare): Remove or rename ENABLE_GOOGLE_NOW: http://crbug.com/459827.
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 if (a->IsSameProfile(b)) 236 if (a->IsSameProfile(b))
236 return false; 237 return false;
237 return a->GetOriginalProfile() < b->GetOriginalProfile(); 238 return a->GetOriginalProfile() < b->GetOriginalProfile();
238 } 239 }
239 240
240 double Profile::GetDefaultZoomLevelForProfile() { 241 double Profile::GetDefaultZoomLevelForProfile() {
241 return GetDefaultStoragePartition(this) 242 return GetDefaultStoragePartition(this)
242 ->GetHostZoomMap() 243 ->GetHostZoomMap()
243 ->GetDefaultZoomLevel(); 244 ->GetDefaultZoomLevel();
244 } 245 }
OLDNEW
« no previous file with comments | « chrome/browser/interstitials/security_interstitial_page.cc ('k') | chrome/browser/safe_browsing/client_side_detection_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698