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

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

Issue 2458833005: Move printing defines to buildflag system. (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_impl.h" 5 #include "chrome/browser/profiles/profile_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 #include "components/zoom/zoom_event_manager.h" 107 #include "components/zoom/zoom_event_manager.h"
108 #include "content/public/browser/browser_thread.h" 108 #include "content/public/browser/browser_thread.h"
109 #include "content/public/browser/dom_storage_context.h" 109 #include "content/public/browser/dom_storage_context.h"
110 #include "content/public/browser/notification_service.h" 110 #include "content/public/browser/notification_service.h"
111 #include "content/public/browser/render_process_host.h" 111 #include "content/public/browser/render_process_host.h"
112 #include "content/public/browser/storage_partition.h" 112 #include "content/public/browser/storage_partition.h"
113 #include "content/public/browser/url_data_source.h" 113 #include "content/public/browser/url_data_source.h"
114 #include "content/public/browser/user_metrics.h" 114 #include "content/public/browser/user_metrics.h"
115 #include "content/public/common/content_constants.h" 115 #include "content/public/common/content_constants.h"
116 #include "content/public/common/page_zoom.h" 116 #include "content/public/common/page_zoom.h"
117 #include "printing/features/features.h"
117 #include "ui/base/l10n/l10n_util.h" 118 #include "ui/base/l10n/l10n_util.h"
118 119
119 #if defined(OS_CHROMEOS) 120 #if defined(OS_CHROMEOS)
120 #include "chrome/browser/chromeos/locale_change_guard.h" 121 #include "chrome/browser/chromeos/locale_change_guard.h"
121 #include "chrome/browser/chromeos/preferences.h" 122 #include "chrome/browser/chromeos/preferences.h"
122 #include "chrome/browser/chromeos/profiles/profile_helper.h" 123 #include "chrome/browser/chromeos/profiles/profile_helper.h"
123 #include "components/user_manager/user_manager.h" 124 #include "components/user_manager/user_manager.h"
124 #endif 125 #endif
125 126
126 #if BUILDFLAG(ENABLE_BACKGROUND) 127 #if BUILDFLAG(ENABLE_BACKGROUND)
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 371
371 registry->RegisterStringPref(prefs::kSupervisedUserId, std::string()); 372 registry->RegisterStringPref(prefs::kSupervisedUserId, std::string());
372 #if defined(OS_IOS) || defined(OS_ANDROID) 373 #if defined(OS_IOS) || defined(OS_ANDROID)
373 uint32_t home_page_flags = PrefRegistry::NO_REGISTRATION_FLAGS; 374 uint32_t home_page_flags = PrefRegistry::NO_REGISTRATION_FLAGS;
374 #else 375 #else
375 uint32_t home_page_flags = user_prefs::PrefRegistrySyncable::SYNCABLE_PREF; 376 uint32_t home_page_flags = user_prefs::PrefRegistrySyncable::SYNCABLE_PREF;
376 #endif 377 #endif
377 registry->RegisterStringPref(prefs::kHomePage, 378 registry->RegisterStringPref(prefs::kHomePage,
378 std::string(), 379 std::string(),
379 home_page_flags); 380 home_page_flags);
380 #if defined(ENABLE_PRINTING) 381 #if BUILDFLAG(ENABLE_PRINTING)
381 registry->RegisterBooleanPref(prefs::kPrintingEnabled, true); 382 registry->RegisterBooleanPref(prefs::kPrintingEnabled, true);
382 #endif 383 #endif
383 registry->RegisterBooleanPref(prefs::kPrintPreviewDisabled, false); 384 registry->RegisterBooleanPref(prefs::kPrintPreviewDisabled, false);
384 registry->RegisterStringPref( 385 registry->RegisterStringPref(
385 prefs::kPrintPreviewDefaultDestinationSelectionRules, std::string()); 386 prefs::kPrintPreviewDefaultDestinationSelectionRules, std::string());
386 registry->RegisterBooleanPref(prefs::kForceEphemeralProfiles, false); 387 registry->RegisterBooleanPref(prefs::kForceEphemeralProfiles, false);
387 #if defined(ENABLE_MEDIA_ROUTER) 388 #if defined(ENABLE_MEDIA_ROUTER)
388 registry->RegisterBooleanPref(prefs::kEnableMediaRouter, true); 389 registry->RegisterBooleanPref(prefs::kEnableMediaRouter, true);
389 #endif 390 #endif
390 // Initialize the cache prefs. 391 // Initialize the cache prefs.
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { 1273 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) {
1273 domain_reliability::DomainReliabilityService* service = 1274 domain_reliability::DomainReliabilityService* service =
1274 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> 1275 domain_reliability::DomainReliabilityServiceFactory::GetInstance()->
1275 GetForBrowserContext(this); 1276 GetForBrowserContext(this);
1276 if (!service) 1277 if (!service)
1277 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); 1278 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>();
1278 1279
1279 return service->CreateMonitor( 1280 return service->CreateMonitor(
1280 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); 1281 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
1281 } 1282 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698