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

Unified Diff: chrome/browser/browser_process_impl.cc

Issue 662783002: Cleanup: Only include background_mode_manager.h when ENABLE_BACKGROUND is defined. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « chrome/browser/browser_process_impl.h ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_process_impl.cc
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index b093cb410c3b2016ca15273e5b3da6f9b6b8b8fd..b0ae1eab596e7721a3f6b5167830969c81f61c54 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() {
Andrew T Wilson (Slow) 2014/10/20 14:23:02 Why isn't this entire API inside ENABLE_BACKGROUND
Lei Zhang 2014/10/20 18:38:20 I'm being consistent with the all the other #ifdef
+#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() {
« no previous file with comments | « chrome/browser/browser_process_impl.h ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698