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

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

Issue 1458653002: New build flag system, convert Google Now flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « chrome/browser/extensions/component_loader.cc ('k') | chrome/browser/resources/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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"
15 #include "chrome/common/pref_names.h" 16 #include "chrome/common/pref_names.h"
16 #include "components/browser_sync/browser/profile_sync_service.h" 17 #include "components/browser_sync/browser/profile_sync_service.h"
17 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref s.h" 18 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref s.h"
18 #include "components/pref_registry/pref_registry_syncable.h" 19 #include "components/pref_registry/pref_registry_syncable.h"
19 #include "components/sync_driver/sync_prefs.h" 20 #include "components/sync_driver/sync_prefs.h"
20 #include "content/public/browser/host_zoom_map.h" 21 #include "content/public/browser/host_zoom_map.h"
21 #include "content/public/browser/notification_service.h" 22 #include "content/public/browser/notification_service.h"
22 #include "content/public/browser/notification_source.h" 23 #include "content/public/browser/notification_source.h"
23 #include "content/public/browser/storage_partition.h" 24 #include "content/public/browser/storage_partition.h"
24 #include "content/public/browser/web_contents.h" 25 #include "content/public/browser/web_contents.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 true, 92 true,
92 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 93 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
93 registry->RegisterBooleanPref(prefs::kSafeBrowsingExtendedReportingEnabled, 94 registry->RegisterBooleanPref(prefs::kSafeBrowsingExtendedReportingEnabled,
94 false); 95 false);
95 registry->RegisterBooleanPref(prefs::kSafeBrowsingProceedAnywayDisabled, 96 registry->RegisterBooleanPref(prefs::kSafeBrowsingProceedAnywayDisabled,
96 false); 97 false);
97 registry->RegisterBooleanPref(prefs::kSSLErrorOverrideAllowed, true); 98 registry->RegisterBooleanPref(prefs::kSSLErrorOverrideAllowed, true);
98 registry->RegisterDictionaryPref(prefs::kSafeBrowsingIncidentsSent); 99 registry->RegisterDictionaryPref(prefs::kSafeBrowsingIncidentsSent);
99 registry->RegisterBooleanPref( 100 registry->RegisterBooleanPref(
100 prefs::kSafeBrowsingExtendedReportingOptInAllowed, true); 101 prefs::kSafeBrowsingExtendedReportingOptInAllowed, true);
101 #if defined(ENABLE_GOOGLE_NOW) 102 #if BUILDFLAG(ENABLE_GOOGLE_NOW)
102 registry->RegisterBooleanPref(prefs::kGoogleGeolocationAccessEnabled, false); 103 registry->RegisterBooleanPref(prefs::kGoogleGeolocationAccessEnabled, false);
103 #endif 104 #endif
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.
107 registry->RegisterBooleanPref(prefs::kGoogleNowLauncherEnabled, true); 108 registry->RegisterBooleanPref(prefs::kGoogleNowLauncherEnabled, true);
108 registry->RegisterBooleanPref(prefs::kDisableExtensions, false); 109 registry->RegisterBooleanPref(prefs::kDisableExtensions, false);
109 #if defined(ENABLE_EXTENSIONS) 110 #if defined(ENABLE_EXTENSIONS)
110 registry->RegisterBooleanPref(extensions::pref_names::kAlertsInitialized, 111 registry->RegisterBooleanPref(extensions::pref_names::kAlertsInitialized,
111 false); 112 false);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 if (a->IsSameProfile(b)) 207 if (a->IsSameProfile(b))
207 return false; 208 return false;
208 return a->GetOriginalProfile() < b->GetOriginalProfile(); 209 return a->GetOriginalProfile() < b->GetOriginalProfile();
209 } 210 }
210 211
211 double Profile::GetDefaultZoomLevelForProfile() { 212 double Profile::GetDefaultZoomLevelForProfile() {
212 return GetDefaultStoragePartition(this) 213 return GetDefaultStoragePartition(this)
213 ->GetHostZoomMap() 214 ->GetHostZoomMap()
214 ->GetDefaultZoomLevel(); 215 ->GetDefaultZoomLevel();
215 } 216 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/component_loader.cc ('k') | chrome/browser/resources/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698