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

Unified Diff: chrome/browser/browser_process_impl.cc

Issue 10540033: Add ENABLE_PRINTING and disable it on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/browser_process_impl.cc
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index e8648ef71df9cf6bcda02ffc9cc7e7ff6415cd93..fa8ac2f964c61206574fd9e7349755ed23cd7d13 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -144,7 +144,7 @@ BrowserProcessImpl::BrowserProcessImpl(const CommandLine& command_line)
g_browser_process = this;
clipboard_.reset(new ui::Clipboard);
-#if !defined(OS_ANDROID)
+#if defined(ENABLE_PRINTING)
// Must be created after the NotificationService.
print_job_manager_.reset(new printing::PrintJobManager);
#endif
@@ -281,7 +281,7 @@ unsigned int BrowserProcessImpl::ReleaseModule() {
if (0 == module_ref_count_) {
release_last_reference_callstack_ = base::debug::StackTrace();
-#if !defined(OS_ANDROID)
+#if defined(ENABLE_PRINTING)
// Wait for the pending print jobs to finish. Don't do this later, since
// this might cause a nested message loop to run, and we don't want pending
// tasks to run once teardown has started.
@@ -499,27 +499,27 @@ printing::PrintJobManager* BrowserProcessImpl::print_job_manager() {
printing::PrintPreviewTabController*
BrowserProcessImpl::print_preview_tab_controller() {
-#if defined(OS_ANDROID)
- NOTIMPLEMENTED();
- return NULL;
-#else
+#if defined(ENABLE_PRINTING)
DCHECK(CalledOnValidThread());
if (!print_preview_tab_controller_.get())
CreatePrintPreviewTabController();
return print_preview_tab_controller_.get();
+#else
+ NOTIMPLEMENTED();
+ return NULL;
#endif
}
printing::BackgroundPrintingManager*
BrowserProcessImpl::background_printing_manager() {
-#if defined(OS_ANDROID)
- NOTIMPLEMENTED();
- return NULL;
-#else
+#if defined(ENABLE_PRINTING)
DCHECK(CalledOnValidThread());
if (!background_printing_manager_.get())
CreateBackgroundPrintingManager();
return background_printing_manager_.get();
+#else
+ NOTIMPLEMENTED();
+ return NULL;
#endif
}
@@ -713,7 +713,7 @@ void BrowserProcessImpl::CreateLocalState() {
pref_change_registrar_.Init(local_state_.get());
-#if !defined(OS_ANDROID)
+#if defined(ENABLE_PRINTING)
print_job_manager_->InitOnUIThread(local_state_.get());
#endif
@@ -829,17 +829,21 @@ void BrowserProcessImpl::CreateStatusTray() {
}
void BrowserProcessImpl::CreatePrintPreviewTabController() {
-#if defined(OS_ANDROID)
- NOTIMPLEMENTED();
-#else
+#if defined(ENABLE_PRINTING)
DCHECK(print_preview_tab_controller_.get() == NULL);
print_preview_tab_controller_ = new printing::PrintPreviewTabController();
+#else
+ NOTIMPLEMENTED();
#endif
}
void BrowserProcessImpl::CreateBackgroundPrintingManager() {
+#if defined(ENABLE_PRINTING)
DCHECK(background_printing_manager_.get() == NULL);
background_printing_manager_.reset(new printing::BackgroundPrintingManager());
+#else
+ NOTIMPLEMENTED();
+#endif
}
void BrowserProcessImpl::CreateSafeBrowsingService() {

Powered by Google App Engine
This is Rietveld 408576698