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

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

Issue 2479593006: Move enable extensions define to a build flag. (Closed)
Patch Set: Merge Created 4 years, 1 month 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/safe_browsing_db/safe_browsing_prefs.h"
21 #include "components/sync/base/sync_prefs.h" 21 #include "components/sync/base/sync_prefs.h"
22 #include "content/public/browser/host_zoom_map.h" 22 #include "content/public/browser/host_zoom_map.h"
23 #include "content/public/browser/notification_service.h" 23 #include "content/public/browser/notification_service.h"
24 #include "content/public/browser/notification_source.h" 24 #include "content/public/browser/notification_source.h"
25 #include "content/public/browser/storage_partition.h" 25 #include "content/public/browser/storage_partition.h"
26 #include "content/public/browser/web_contents.h" 26 #include "content/public/browser/web_contents.h"
27 #include "content/public/browser/web_ui.h" 27 #include "content/public/browser/web_ui.h"
28 #include "extensions/features/features.h"
28 29
29 #if defined(OS_CHROMEOS) 30 #if defined(OS_CHROMEOS)
30 #include "base/command_line.h" 31 #include "base/command_line.h"
31 #include "chrome/common/chrome_switches.h" 32 #include "chrome/common/chrome_switches.h"
32 #include "chromeos/chromeos_switches.h" 33 #include "chromeos/chromeos_switches.h"
33 #endif 34 #endif
34 35
35 #if defined(ENABLE_EXTENSIONS) 36 #if BUILDFLAG(ENABLE_EXTENSIONS)
36 #include "extensions/browser/pref_names.h" 37 #include "extensions/browser/pref_names.h"
37 #endif 38 #endif
38 39
39 Profile::Profile() 40 Profile::Profile()
40 : restored_last_session_(false), 41 : restored_last_session_(false),
41 sent_destroyed_notification_(false), 42 sent_destroyed_notification_(false),
42 accessibility_pause_level_(0), 43 accessibility_pause_level_(0),
43 is_guest_profile_(false), 44 is_guest_profile_(false),
44 is_system_profile_(false) { 45 is_system_profile_(false) {
45 } 46 }
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 false); 104 false);
104 registry->RegisterBooleanPref(prefs::kSSLErrorOverrideAllowed, true); 105 registry->RegisterBooleanPref(prefs::kSSLErrorOverrideAllowed, true);
105 registry->RegisterDictionaryPref(prefs::kSafeBrowsingIncidentsSent); 106 registry->RegisterDictionaryPref(prefs::kSafeBrowsingIncidentsSent);
106 registry->RegisterBooleanPref( 107 registry->RegisterBooleanPref(
107 prefs::kSafeBrowsingExtendedReportingOptInAllowed, true); 108 prefs::kSafeBrowsingExtendedReportingOptInAllowed, true);
108 // This pref is intentionally outside the above #if. That flag corresponds 109 // This pref is intentionally outside the above #if. That flag corresponds
109 // to the Notifier extension and does not gate the launcher page. 110 // to the Notifier extension and does not gate the launcher page.
110 // TODO(skare): Remove or rename ENABLE_GOOGLE_NOW: http://crbug.com/459827. 111 // TODO(skare): Remove or rename ENABLE_GOOGLE_NOW: http://crbug.com/459827.
111 registry->RegisterBooleanPref(prefs::kGoogleNowLauncherEnabled, true); 112 registry->RegisterBooleanPref(prefs::kGoogleNowLauncherEnabled, true);
112 registry->RegisterBooleanPref(prefs::kDisableExtensions, false); 113 registry->RegisterBooleanPref(prefs::kDisableExtensions, false);
113 #if defined(ENABLE_EXTENSIONS) 114 #if BUILDFLAG(ENABLE_EXTENSIONS)
114 registry->RegisterBooleanPref(extensions::pref_names::kAlertsInitialized, 115 registry->RegisterBooleanPref(extensions::pref_names::kAlertsInitialized,
115 false); 116 false);
116 #endif 117 #endif
117 registry->RegisterStringPref(prefs::kSelectFileLastDirectory, std::string()); 118 registry->RegisterStringPref(prefs::kSelectFileLastDirectory, std::string());
118 registry->RegisterDictionaryPref(prefs::kPartitionDefaultZoomLevel); 119 registry->RegisterDictionaryPref(prefs::kPartitionDefaultZoomLevel);
119 registry->RegisterDictionaryPref(prefs::kPartitionPerHostZoomLevels); 120 registry->RegisterDictionaryPref(prefs::kPartitionPerHostZoomLevels);
120 registry->RegisterStringPref(prefs::kDefaultApps, "install"); 121 registry->RegisterStringPref(prefs::kDefaultApps, "install");
121 registry->RegisterBooleanPref(prefs::kSpeechRecognitionFilterProfanities, 122 registry->RegisterBooleanPref(prefs::kSpeechRecognitionFilterProfanities,
122 true); 123 true);
123 registry->RegisterIntegerPref(prefs::kProfileIconVersion, 0); 124 registry->RegisterIntegerPref(prefs::kProfileIconVersion, 0);
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 if (a->IsSameProfile(b)) 238 if (a->IsSameProfile(b))
238 return false; 239 return false;
239 return a->GetOriginalProfile() < b->GetOriginalProfile(); 240 return a->GetOriginalProfile() < b->GetOriginalProfile();
240 } 241 }
241 242
242 double Profile::GetDefaultZoomLevelForProfile() { 243 double Profile::GetDefaultZoomLevelForProfile() {
243 return GetDefaultStoragePartition(this) 244 return GetDefaultStoragePartition(this)
244 ->GetHostZoomMap() 245 ->GetHostZoomMap()
245 ->GetDefaultZoomLevel(); 246 ->GetDefaultZoomLevel();
246 } 247 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_io_data.cc ('k') | chrome/browser/profiles/profile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698