summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_process_impl.cc
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2014-10-20 11:58:02 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-20 18:58:35 +0000
commite415584fa49388436406239a9c632961fc664a62 (patch)
treee8708984b7fb8bc3a01b1a0b385a39db0bd30c47 /chrome/browser/browser_process_impl.cc
parent18d0a569464ac036813f190013df52848164e43d (diff)
downloadchromium_src-e415584fa49388436406239a9c632961fc664a62.zip
chromium_src-e415584fa49388436406239a9c632961fc664a62.tar.gz
chromium_src-e415584fa49388436406239a9c632961fc664a62.tar.bz2
Cleanup: Only include background_mode_manager.h when ENABLE_BACKGROUND is defined.
Also move some extension headers to ENABLE_EXTENSIONS sections. BUG=424746 Review URL: https://codereview.chromium.org/662783002 Cr-Commit-Position: refs/heads/master@{#300306}
Diffstat (limited to 'chrome/browser/browser_process_impl.cc')
-rw-r--r--chrome/browser/browser_process_impl.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index b093cb4..b0ae1ea 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -24,7 +24,6 @@
#include "base/threading/thread.h"
#include "base/threading/thread_restrictions.h"
#include "base/time/default_tick_clock.h"
-#include "chrome/browser/background/background_mode_manager.h"
#include "chrome/browser/chrome_browser_main.h"
#include "chrome/browser/chrome_content_browser_client.h"
#include "chrome/browser/chrome_notification_types.h"
@@ -91,7 +90,6 @@
#include "content/public/browser/service_worker_context.h"
#include "content/public/browser/storage_partition.h"
#include "extensions/common/constants.h"
-#include "extensions/common/extension_l10n_util.h"
#include "net/socket/client_socket_pool_manager.h"
#include "net/url_request/url_request_context_getter.h"
#include "ui/base/l10n/l10n_util.h"
@@ -116,6 +114,10 @@
#include "ui/aura/env.h"
#endif
+#if defined(ENABLE_BACKGROUND)
+#include "chrome/browser/background/background_mode_manager.h"
+#endif
+
#if defined(ENABLE_CONFIGURATION_POLICY)
#include "components/policy/core/browser/browser_policy_connector.h"
#else
@@ -128,6 +130,7 @@
#include "chrome/browser/extensions/extension_renderer_state.h"
#include "chrome/browser/media_galleries/media_file_system_registry.h"
#include "components/storage_monitor/storage_monitor.h"
+#include "extensions/common/extension_l10n_util.h"
#endif
#if !defined(DISABLE_NACL)
@@ -727,7 +730,9 @@ const std::string& BrowserProcessImpl::GetApplicationLocale() {
void BrowserProcessImpl::SetApplicationLocale(const std::string& locale) {
locale_ = locale;
+#if defined(ENABLE_EXTENSIONS)
extension_l10n_util::SetProcessLocale(locale);
+#endif
chrome::ChromeContentBrowserClient::SetApplicationLocale(locale);
translate::TranslateDownloadManager::GetInstance()->set_application_locale(
locale);
@@ -841,7 +846,9 @@ BackgroundModeManager* BrowserProcessImpl::background_mode_manager() {
void BrowserProcessImpl::set_background_mode_manager_for_test(
scoped_ptr<BackgroundModeManager> manager) {
+#if defined(ENABLE_BACKGROUND)
background_mode_manager_ = manager.Pass();
+#endif
}
StatusTray* BrowserProcessImpl::status_tray() {
@@ -1085,10 +1092,12 @@ void BrowserProcessImpl::CreateNotificationUIManager() {
}
void BrowserProcessImpl::CreateBackgroundModeManager() {
+#if defined(ENABLE_BACKGROUND)
DCHECK(background_mode_manager_.get() == NULL);
background_mode_manager_.reset(
new BackgroundModeManager(CommandLine::ForCurrentProcess(),
&profile_manager()->GetProfileInfoCache()));
+#endif
}
void BrowserProcessImpl::CreateStatusTray() {