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

Unified Diff: chrome/browser/browser_process_impl.cc

Issue 6914021: Modifying the BackgroundModeManager to handle multiple profiles. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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/profiles/profile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_process_impl.cc
===================================================================
--- chrome/browser/browser_process_impl.cc (revision 86624)
+++ chrome/browser/browser_process_impl.cc (working copy)
@@ -16,6 +16,7 @@
#include "base/threading/thread.h"
#include "base/threading/thread_restrictions.h"
#include "chrome/browser/automation/automation_provider_list.h"
+#include "chrome/browser/background_mode_manager.h"
#include "chrome/browser/browser_main.h"
#include "chrome/browser/browser_process_sub_thread.h"
#include "chrome/browser/browser_trial.h"
@@ -53,6 +54,7 @@
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/browser/shell_integration.h"
#include "chrome/browser/sidebar/sidebar_manager.h"
+#include "chrome/browser/status_icons/status_tray.h"
#include "chrome/browser/tab_closeable_state_watcher.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/common/chrome_constants.h"
@@ -635,6 +637,20 @@
return tab_closeable_state_watcher_.get();
}
+BackgroundModeManager* BrowserProcessImpl::background_mode_manager() {
+ DCHECK(CalledOnValidThread());
+ if (!background_mode_manager_.get())
+ CreateBackgroundModeManager();
+ return background_mode_manager_.get();
+}
+
+StatusTray* BrowserProcessImpl::status_tray() {
+ DCHECK(CalledOnValidThread());
+ if (!status_tray_.get())
+ CreateStatusTray();
+ return status_tray_.get();
+}
+
safe_browsing::ClientSideDetectionService*
BrowserProcessImpl::safe_browsing_detection_service() {
DCHECK(CalledOnValidThread());
@@ -975,6 +991,17 @@
tab_closeable_state_watcher_.reset(TabCloseableStateWatcher::Create());
}
+void BrowserProcessImpl::CreateBackgroundModeManager() {
+ DCHECK(background_mode_manager_.get() == NULL);
+ background_mode_manager_.reset(
+ new BackgroundModeManager(CommandLine::ForCurrentProcess()));
+}
+
+void BrowserProcessImpl::CreateStatusTray() {
+ DCHECK(status_tray_.get() == NULL);
+ status_tray_.reset(StatusTray::Create());
+}
+
void BrowserProcessImpl::CreatePrintPreviewTabController() {
DCHECK(print_preview_tab_controller_.get() == NULL);
print_preview_tab_controller_ = new printing::PrintPreviewTabController();
« no previous file with comments | « chrome/browser/browser_process_impl.h ('k') | chrome/browser/profiles/profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698